Skip to main content

Cloud

Capturing the OnItemChanged event on a List

To catch the onItemChanged event of any Sharepoint list in a workflow, the following needs to be done:

  • Add a CallExternalMethod Activity, set the interface to Microsoft.SharePoint.Workflow.IListItemService
  • Set the method name to InitializeForEvents
  • Bind the ItemId, ListId to ItemID and ListId in the workflow properties.
  • Add a HandleExternalEvent activity and specify the following properties:
    InterfaceType to Microsoft.SharePoint.Workflow.IListItemService
    Event Name : OnItemChanged
    NOTE: The correlationToken should be the same as the correlation token specified for CallExternalMethod activity.
    Method Name. This method will be called whenever there is a change in the list item.
  • Bind the ID property to a field. Initialize this field to a new GUID.
  • This will capture the onItemChanged event.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Amol Ajgaonkar

More from this Author

Follow Us