You need to sign in to do that
Don't have an account?
Apex Trigger Assigning a specific type of lead to a specific Queue
Hi All,
While working on Salesforce point & click functionalities , we are trying to complete the final part of the logic of our Apex trigger for a client .
The final part of the business logic we are trying to implement now is to automatically take leads with "Annual Revenue" amount of above 500k and a pick list value of "finance" for the "vertical" field and assign it to the "Financial expertise" team Queue :
if (l.AnnualRevenue >= 500000 & l.Vertical__c == 'Finance') {
then
Assign lead to the "Financial Expertise" Queue
I created a pick list based "vertical "field on the Lead object and a created Queue named "Financial Expertise" based on the Lead object for this purpose.
I would appreciate your code input on this use case or code reference to similar use case where you assign the lead to a specific Queue. This is my first Salesforce project so I appreciate your input and help on this.
I guess I would have to assign a lead owner value to the "Finance Expertise" Queue ID. what would be the queue assignment code input for this if statement:
if (l.AnnualRevenue >= 500000 & l.Vertical__c == 'Finance') {
Assign lead owner to the the "Financial Expertise" Queue ID ?
Thanks. This is my first Salesforce project so I appreciate your input.
you can maybe try something like below. Here is the documentation for Group
https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_group.htm