0

I have a flow on the Salesforce Case object, and I want to assign the case record to a queue based on the following conditions:

If the user's assigned permission set group contains 'x' in the name, then assign the case to the 'x queue.'

If the user's assigned permission set group contains 'y' in the name, then assign the case to the 'y queue.'

Is it possible to achieve this using a flow in Salesforce? If so, how can I set up the flow to dynamically assign the case to the appropriate queue based on the user's permission set group?"

1 Answer 1

1

A far easier solution is to add a Custom Permission to one or more of the Permission Sets in the Permission Set Group(s)

Then you can use $Permission.Foo or $Permission.Bar in a Flow expression (they are booleans).

Using Custom Permissions has added advantages

  • You can use them to control dynamic components on Lightning App or Record Pages - actions, sections, fields, components
  • They can be used in formula fields
  • They can be used in Validation Rules
  • They can readily be inspected in Apex using the FeatureManagement.checkPermission method

Determining whether a user has a specific Permission Set Group requires querying PermissionSetGroup and PermissionSetAssignment as shown in the Object Schema. While this can be done in Flow or Apex; it won't work for the first three advantages listed above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .