0

I have a custom list inside a SharePoint online communication site. and i have attached an ItemAdded remote event receiver to the custom list. now if i create a new list item and i do not attach any file to it >> save the item >> the ItemAdded RER will run once which is fine.

But if i create a new list item and inside the create form i also attach a file >> save the item >> then the RER will run twice. so is there a way to prevent this behavior? or how i can check if the item added is for the list item and not for the attachment ? Thanks

0

If you only want to trigger remote event receiver when adding attachments,you could use an attachment was added to the list event directly. enter image description here And you could get event type by this way:

properties.EventType

Source: https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/handle-list-item-events-in-the-provider-hosted-add-in

1
  • i want to fire the RER only when adding a new list item.. also the multiple events will be of type ItemAdded – John John Oct 6 '20 at 10: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.