views:

83

answers:

2

How to execute code when a view is updated in share point portal?

I can not write an event receiver for it because it only fires when list items are updated. I want to write a handler of some sort that gets executed every time a view is updated. What are my options?

By updated view I mean columns are added or removed.

A: 

If you are talking about lists, and not the views that sit on top of them, you can use the SPListEventReceiver class. It has synchronous and asynchronous events for when fields (columns) are added or removed.

Here's a post with everything you need to get started with creating and deploying event receivers.

jwmiller5
I'm talking about the views that sit on top of them.
Hasan Khan
A: 

I have come to conclusion that sharepoint framework does not provide any means for doing this. The only way is to write a database trigger.

Hasan Khan