Friday, May 14, 2010

Difference between Synchronous and Asynchronous Events in Sharepoint

1) Synchronous Event Handlers will work before the event is completed while Asynchronous will fire after the event is completed.
2) Synchronous are mostly used to stop the event from completion in order to validate few things. It means you can cancel the event using Synchronous while it is not possible to cancel the event from Asynchronous .
3) Synchronous methods has their method names ending with -ing while Asynchronous method names will end with -ed. e.g. ItemAdding, ItemUpdating are Synchronous while ItemAdded, ItemUpdated are Asynchronous methods.
4) Synchronous can be used to Add/Modify the values of list fields while using Asynchronous its not possible as it fires after the completion of event.

1 comment:

  1. Hello Everyone this is very helpfull answer for me.

    ReplyDelete