Salesforce SOQL to find whether Lead was assigned via Assignment Rule

Salesforce SOQL to find whether Lead was assigned via Assignment Rule

When a Lead record was assigned via Assignment Rule, in the Lead History entity, we should see an entry with ownerAssignment as the value in the Field column.

Make sure “Enable Lead History” is enabled and Lead Owner field is selected.

Sample SOQL:

SELECT OldValue, NewValue, Field
FROM LeadHistory
WHERE LeadId = '00Q3t00001xxEIAEA2'

Output:

Leave a Reply