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
MilanMilan 

Retrieving Assignment rules

Hello,
 
We plan to retrieve assignment rules using Salesforce API. The rules are retrieved so that when we insert new leads, we also pass the assignment rules that should be simultaneously triggered. we are developing using Java.
 
The query to retrieve assignment rule is as follows:
 

Select Id,Name From AssignmentRule

 
This seems to retrieve ALL the assignment rules. What we are interested is ONLY the assignment rules of LEADS. What should our query be ?
 
Thanks and regards,
Milan
 
 
SuperfellSuperfell
add where sobjectType='lead' to the query. One of the schema explorer / soql builders are a big help in determining these kinds of things.