function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Radosław KarkutRadosław Karkut 

Getting Assignment Rule using SOQL

Hi All,
is it possible to get Assignment Rule using SOQL query? I need to know with one Assignment Rule was triggered on my Lead using API.
Could you give me some advice how to solve my issue?
GauravGargGauravGarg

Hi Radoslaw,

Please use below code to query Assignment Rule:

select id, active, name, SobjectType from AssignmentRule

Hope this will helps you. Let me know if you need more insight on this.

Thanks,
Gaurav

Jha dilipJha dilip
Hi

you can check by running your soql query in workbench also there you can find assignment rule object

Regards
Radosław KarkutRadosław Karkut
OK thank you very much for your advices.
I have one more question:
is it possible to find assignemt rule executed on my new Lead using SOQL?
I need to know what kind of Assignment rule was executed on my new Lead.
Thanks in advance.
​Regards.