1

I found many links which talk about the Before,Current and After properties inside SharePoint servers for event receivers. but did not find any documentation about remote event receivers for SharePoint online? so can anyone advice? i need to know the availability of these under different even types.

Second question, what does it matter for this properties, the event type such as itemadded, itemadding,itemupdated, itemupdating? or the synchronization if it is Synchronous or if it is Async? as for example we can run an ItemAdded in Asyn or in Sync way.. ? Thanks

0

This is the official documentation for remote event receivers, in which they have mentioned about after and before events too. Kindly have a look at all the sections.

Before events are triggered before the SharePoint infrastructure does any of its own handling of the event (including committing changes to the content database). In SharePoint custom before event handlers always execute synchronously. Among other purposes, they can be used to cancel the event. For example, if an add-in has a function for deleting a list, a handler for the list deleting event can cancel the deletion if certain conditions are not met. If the event is part of a sequence of events, cancelling it prevents any of the later events from occurring at all. For example, if your handler for the ItemAdding event cancels the event, the ItemAdded event, which normally comes later, is not triggered.

After events are triggered after the SharePoint infrastructure does any of its own handling of the event. In SharePoint, remote after event handlers, for list and list item events, always execute asynchronously. (App events are an exception.) Among other purposes, they can be used to log events.

Your add-in can handle the following list and document library events. Events ending in "ing" are before (synchronous) events and those ending in "ed" are after (asynchronous) events.

Before (synchronous)    After (asynchronous)
ListAdding                 ListAdded
ListDeleting               ListDeleted
FieldAdding                FieldAdded
FieldDeleting              FieldDeleted
FieldUpdating              FieldUpdated

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.

Your add-in can handle the following list item events.

TABLE 2

    Before (synchronous)    After (asynchronous)
    ItemAdding               ItemAdded
    ItemUpdating             ItemUpdated
    ItemDeleting             ItemDeleted
    ItemCheckingOut          ItemCheckedOut
    ItemCheckingIn           ItemCheckedIn
    ItemUncheckingOut        ItemUncheckedOut
    ItemAttachmentAdding     ItemAttachmentAdded
    ItemAttachmentDeleting   ItemAttachmentDeleted
    ItemFileMoving           ItemFileMoved

ItemVersionDeleting*         ItemVersionDeleted*
ItemFileConverted
1
  • ok thanks for the reply and info, but my question is about the before/after properties inside different event types. something similar to this table enjoysharepoint.com/… which is for SP2013, while i am searching/asking for SP online
    – John John
    Mar 4 '20 at 12:01

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.