Rejoignez les architectes, les développeurs, les administrateurs, designers et autres professionnels qui travaillent avec SharePoint Server 2007 et SharePoint 2010 le 6 novembre 2010 pour un événement SharePoint exceptionnel. Les évènements SharePoint Saturday France sont des journées en libre accès, éducative, informative et animée, remplie de sessions de professionnels & MVPs reconnus pour leurs compétences et heureux de pouvoir partager leur expérience. Suivez-nous sur Twitter @clubsharepoint ou chacun des évènements sur le tag #SPSFrance.Facebook | SharePoint Saturday France
http://www.sharepointsaturday.com/france
I had an event receiver applied on documents wich can start, programatically of course, a workflow. In this workflow, i used to update some metadatas in my document item. However that triggers the event receiver a new time and you can imagine the infinate loop. Well! afeter googling i found that it is possible to diable the event firing just before the item.Update or the item.SystemUpdate. In first time i used this method but i didn't made my code in a try catch bloc. After doing that my workflow runs normally and it didn't fires the events in the event receiver. Here is the code : public static class SPListItemExtensions { /// /// Provides ability to update list item without firing event receiver. /// /// /// Disables firing /// event receiver while updating item. public static void Update ( this SPListItem item , bool doNotFireEvents ) { SPItemEventReceiverHandling rh = new SPItemEventReceiverHandling (); if ( doNotFireEven...
Comments
Post a Comment