1

Is there an event or notification or some way to execute a piece of code as soon as a new View is added to a specific List?

I need to modify this newly added View (more specifically I need to edit the created file NewView.aspx) to add a custom WebPart to it.

  • What are you trying to achieve, maybe we can give you some right direction ? – Arsalan Adam Khatri Nov 5 '13 at 12:40
  • The default views which are shipped with the solution are automatically modified in the Featurereceiver. I need to add a WebPart to the page (like AllItems.aspx) which does some custom actions programmatically. But when I add a new View, this WP is not added of course. I need a automatic way and not with SPD. – Kirschi Nov 5 '13 at 12:46
2

There is no SharePoint event for view added. These are the available event receivers

  • And what about the created file? Like AllItems.aspx. Is there a hidden Document Library where these files get added? This way I could add a receiver on that list. – Kirschi Nov 6 '13 at 14:49
  • Looks like there is really no way to find out if a new View was added. Except checking every x minutes with a TimerJob, but that is quite ugly I'd say. – Kirschi Dec 5 '13 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.