1
votes

I need to set Item-Permissions on creation of an Item in a SharePoint-List. Therefor I created an EventReceiver

Inside the ItemAdded-Event I can get the ListItem (properties.ListItem) but that Event is fired asynchronously.

On the other Side I have the synchronous Event ItemAdding. But inside this Event the ListItem does not exist so I cannot add Userpermissions.

Is there a way to solve this dilemma?

1
What dilemma ? Use the Item-Added event; if your question is how to setting event handler sync you can specify the sync / async on element.xml of the event receiver. You can also use a simple workflow with action "run the action as user" or something like that and inside use the set permissions.Max

1 Answers

2
votes

Use Item added event receiver. Edit the Elements.xml file of the event receiver and set the synchronization element as below..

<Synchronization>Synchronous</Synchronization>