+ Start a Discussion
GaneeeshGaneeesh 

is triggers runs in system mode only..?

Can anybody help me triggers runs in user mode or system mode. If triggers runs in system mode only , please give me idea to run trigger in user mode.
Is there any chance to run trigger in user mode..?
AshlekhAshlekh
Hi,

Yes trigger always run in system mode instead of user mode, I don't think you can run trigger in user mode.
GaneeeshGaneeesh
Thanks Mr.McGraw...
David "w00t!" LiuDavid "w00t!" Liu
There are a couple things you can do to get close to user mode:
  1. Move your trigger logic to a class and use the "with sharing" keywords:
    1. https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_keywords_sharing.htm
  2. Get the details of the logged in user using the UserInfo class, then query for his/her permissions
    1. https://developer.salesforce.com/blogs/engineering/2012/06/using-soql-to-determine-your-users-permissions-2.html