Synchronus – Before event that occurs Differences between Sync & Async event handlers are: 1) Synch Event Handler occurs before the event is completed while Asynch occurs after the event is completed.
2) Synch Event Handler is mostly used to stop the event from completion in order to validate few things.
I write function because I have more than one child tables for same parent.
So rather than write deleting code for finding child data with same id and deleting data I write code and pass List and Parent Id to that function.
Your add-in can handle the following list item events.
To change the events that the remote event receiver handles, open Solution Explorer, open the Properties window for the remote event receiver, expand the Share Point Events node, and then set only the events that you want to handle to True.
For more information, see Include rollback logic and "already done" logic in your add-in event handlers.
There are two ways to register a handler: The field update events are about changing the properties of a field (column) on a list, such as whether it is sortable, not about changing the data in the field.
Two more steps are required before the App Uninstalling event is triggered.
First, a user must remove the add-in from the recycle bin, which moves it to the second stage recycle bin.
4) Synch Event Handler can be used to Add/Modify the values of list fields while using Asynch Event Handler its not possible as it fires after the completion of event. Let me give you example, I have lists like Program, Sub Program.
So when end user is going to delete Program ,all related its subprogram must be deleted. Once parent is deleted we have to delete all its children. For any listeventhandler first we have to Implements a related Interface depends on requirement .
The add-in doesn't even have to have an add-in web.