You need to sign in to do that
Don't have an account?
ABC XYZ 39
How to use Custom Labels in Trigger
Hi, I need to add a list of users to a Cusom Label. I then need to reference this label to allow only users in Custom Label the ability to write data into a custom object using a trigger . I'm new to Apex and Salesforce. Please assist. Thanks.
OSI Consulting
All Answers
You can use custom label like below:
string customLabel = label.<your custom label name>;
system.debug('=============label '+customLabel );
Are you concatenating the User names in comma separated fashion in custom label? If so, Just split them in code and put them in a set. Query on User object based on the last modified by Id to fetch the name. Use set.contains() to find the occurence of User name in set.
OSI Consulting