2

I have a sandbox solution for SharePoint 2013. (because it has to work in Office365) I have an eventreceiver that adds an item to a list. I don't want users to manually change that list, so I don't give them rights on that list. However the eventreceiver is executed with the users privileges. Giving the user no rigths to the list means the eventreceiver won't work, and run with elevated privileges is not allowed in the sandbox. What would be the best way to accomplish this scenario?

1 Answer 1

1

I see this is an old one, not sure if it's still an issue. Using code in Sandbox solutions isn't supported in SP2013, so I would lean away from this as much as possible. Code in sandbox solutions is backward compatible to support SP2010 solutions, but it has been deprecated in SP2013.

With that said, even if you were going to keep the code, you can't elevate privileges in sandbox solutions. I think your best bet will be to look at possibly using a workflow instead. Workflows in SP2013 can be "elevated" to run under the workflow publishers identity, which may solve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.