In my custom application I’m creating list document programmatically now I want to modify newly created item security along with it. For example, When item is created only current user and some admins will be in item level permission. My question is should I add code in my current module ( which does not run in event receivers) or do I need to add separate event receiver for the same ( like Itemadded )?
In my custom application I’m creating list document programmatically now I want to modify
Share
How are you creating the document?
You say programatically, which to me sounds like you’re running .net code which creates a new
SPListItemthroughsomeList.AddItem(), in which case you can just set the permissions usingitem.BreakRoleInheritance(false)anditem.RoleAssignments.