Development questions
Write a SOQL query to fetch all Users who are assigned a specific Permission Set (PermissionSetAssignment where PermissionSet.Name = 'Sales_Ops').
Query PermissionSetAssignment and filter on the permission set name, selecting the assigned user details through the Assignee relationship.
soql
SELECT Assignee.Id, Assignee.Name, Assignee.Username
FROM PermissionSetAssignment
WHERE PermissionSet.Name = 'Sales_Ops'
The API name goes in PermissionSet.Name, not the label.
soqlscenariopermission-setsetup-objects
More Development questions
- What is an Apex Trigger in Salesforce and when should you use it over Flows?
- What is the difference between before triggers and after triggers?
- Explain all Trigger context variables (isInsert, isUpdate, isDelete, isUndelete, isBefore, isAfter, isExecuting, size, operationType).
- What is the difference between Trigger.new and Trigger.old?
- In which trigger events are Trigger.new and Trigger.newMap available?
- In which trigger events are Trigger.old and Trigger.oldMap available?