function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vegaln1Vegaln1 

How to determine what profile is running a trigger.

Hello, Is there a way to determine the Profile of a user that has 'tripped' a trigger? I would like to know if the current user is NOT a Sys admin profile then execute a certain portion of a trigger. If the person is a Sys admin profile, then execute a different piece of code in the trigger. An example would be very helpful. Thanks.

 

Regards,

 

David VPDavid VP

UserInfo.getProfileId() should get you what you want.

 

 

David

Vegaln1Vegaln1

Thanks David.. I'll give that a try.

 

Regards,