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
rahulrocksrahulrocks 

Lead assignment checkbox

Hi all,

Hope u all r rocking...i have a query..plz help me out..

Can anybody tell me the api name of the Lead assignment checkbox(for lead assignment rules) or how to find it.

I need it so that i can turn it automatically on or off when i capture a lead from web to automatically assign a lead

according to my set lead assignment rules...

thanx in advance

 

Best Answer chosen by Admin (Salesforce Developers) 
Cory CowgillCory Cowgill

You can query AssignmentRule SObject to retrieve informatoin about AssignmentRules. I think the field you are asking about is the Active field on AssignmentRule.

 

You can use the Database.DMLOptions methods to set information about current Assignemnt Rule executing in your trigger or API code:

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database_dmloptions.htm

All Answers

Cory CowgillCory Cowgill

You can query AssignmentRule SObject to retrieve informatoin about AssignmentRules. I think the field you are asking about is the Active field on AssignmentRule.

 

You can use the Database.DMLOptions methods to set information about current Assignemnt Rule executing in your trigger or API code:

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database_dmloptions.htm

This was selected as the best answer
Cory CowgillCory Cowgill

Also, I don't think you want to be flipping that Active flag on/off, or if you even can.

 

I think for your use case you want to execute your own Assignment Rule if the Lead is coming in from Web, which you could catch in the Trigger I believe.