You need to sign in to do that
Don't have an account?
javierjies
issue with sharing
Hello everyone!
Using an Appex trigger we like to add a record in sharing table. The user who update the record that trigger the appex is not the owner so the trigger fail.
We would like to know is it possible to run a trigger from the owner of the record despite the user that modify the record that trigger "the trigger" had only read/write access.
Regards.
Hi Javier,
Since Apex Triggers are run as an Admin User you should not have that problem you are explaining.
Anyhow, I think you could use the System.runAs(<userId>){} method to run the code as the user you want to.
Good luck.
Cheers,
Susana
Sorry, I mixed up everything.
Just give a try to the System.runAs() and see what happens
System.runAs() can be used in test methods only.
Can you post the exact error message that you receive on trigger failure?