Tag Info

Hot answers tagged

4

public override void ItemUpdating(SPItemEventProperties properties) { try { //is the item checked out? if (isCheckin(properties) == false) { this.EventFiringEnabled = false; //do your stuff } } catch(Exception a) { //catch any errors } finally { this.EventFiringEnabled = true; } } private bool ...


3

For the scenario when you are the one triggering the second ItemUpdating by changing item values you can use the EventFiringEnabled parameter (you should use a try - catch -finally around it): this.EventFiringEnabled = false; // Do the changes item.Update(); this.EventFiringEnabled = true; The other scenario is tougher, and the reason behind why I use ...


2

no that code above is only required within the updating event. Say i have an added event and updating/updated event. when the added/adding event is triggered it will then trigger the updated/updating event. you can put the code within the item adding or added so that it doesnt trigger the updating event at the same time. the point of the code is to stop ...


2

It is really depend upon you requirement. from simplest way to workflow to event receiver. Simple way is using the calculted column use the workflow( personally i dont like this) event Reciever: By using this strategy, users have advantage to edit the existing values, we can also avoid it by making field read-only on feature activation. Using item event ...


2

Using an event receiver: You can check the last added item, then increment it with 1. Then modify the number as 2014/001, 2014/002 and ect... No need to have workflows. Another way is having a property bag value which stores the last added id, then increment it by 1 and save, set that value to the number to the list item. This too can be done using an ...


1

Yes they run under the w3wp worker process, you have to attach to OWSTIMER.EXE for debugging. Check this blog, he talked about the how to debug the event received. Debugging Event Receivers in SharePoint 2010 Key steps: now my process works like this: Compile Deploy net stop sptimerv4 net start sptimerv4 Run my code and hit my breakpoint I'm actually ...


1

Talked to MS support regarding this and He told me that this is the expected behavior for app uninstall. His argument was that app is like any other object within SharePoint and once you delete it, it should go to recycle bin for any recovery possibility. It stays there for 90 days. I also discussed about change of behavior for Uninstalling event receiver. ...



Only top voted, non community-wiki answers of a minimum length are eligible