0

I found a way to copy the attachments of a list item from one to another, therefore I used this code: Sharepoint Online: Copy attachment of list item to a new item using Client object model

Now I have a new problem: I have an ItemUpdating & ItemUpdated event receiver, which listen both to my list, where the attachments are copied to. I want to prevent them from firing before all the attachments are copied. Actually the events are called when I save the list file (as I have to save before I'm able to copy the attachments!), but this should be avoided. Is there a possibility to "pause" the event receivers for this item until the attachments are copied? I need to realize it with the client object model.

Community
  • 1
  • 1
D. Müller
  • 3,336
  • 4
  • 36
  • 84

1 Answers1

0

Is it one time requirement? If yes, then you can turn off event receiver Enable/Disable Event receiver on list for sometime (till you completely process the attachment uploads) and then re-enable it. As CSOM doesn't support event receiver customization you have to use the web services to do this job on client side.

If it is real time scenario where you need to run this based on some criteria then I don't think you can do it as CSOM doesn't support it.