You need to sign in to do that
Don't have an account?
![EchoEcho EchoEcho](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Updating Content Records "Without Sharing"
I have a Global class exposed as a webservice that is called by users who do not have the "Add Content" Workspace Permission, and am using "without sharing" to try to make it possible for that class to update fields on Content records. However, when I try to call the methods in this class, I receive insufficient access exceptions:
12:18:32.091|EXCEPTION_THROWN|[23]|System.DmlException: Update failed. First exception on row 0 with id 068M00000004G5HIAU; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: []
If I try the same thing with a user that does have the "Add Content" workspace permission, everything works as expected. Is it possible to have a method run in the system context when updating content records?
Thanks,
Tom
I'm having this same problem. Have you managed to get an answer on this? Shame nobody else answered.
Yeah, I got confirmation from Salesforce that Workspace/Content user permissions cannot be overridden by Apex. We ended up having to write information to a custom object, and then have a nightly batch that would go through and update the content records.