Let's say I have a Queue named "My Queue 123" with a Developer Name of "My_Queue_123", is there any typesafe way to refer to it in Apex?
Or can I only pass it around as a string?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Unlike many features, such as field sets and other metadata API names, there's no such thing for queues (which are, of course, Group objects). As usual in these cases, consider using a static constant (
public static final String GROUPNAME = 'whatever'), custom metadata, or custom label to refer to the group consistently.