You need to sign in to do that
Don't have an account?
Anthony Holmes
Trigger Based on Custom Score
Hi there,
I want to make a trigger that fires when a custom field called "Behaviour Score" hits 100 and above. The trigger will change the current lead owner to a new lead owner that is a queue to be distributed between agents. Can anyone help me?
I want to make a trigger that fires when a custom field called "Behaviour Score" hits 100 and above. The trigger will change the current lead owner to a new lead owner that is a queue to be distributed between agents. Can anyone help me?
This trigger will be executed only for below
1. while inserting new Lead records with all 3 conditions to True
L.Behaviour_score__c >= 100 && L.No.of Employees__c <=249 && L.Booking_start__c == null
2. While updating exisiting Lead record with all 3 conditions to True
Behaviour_score__c value is updated and not equals to previous value and Behaviour_score__c >=100
AND
No.of Employees__c value is updated and not equals to previous value and No.of Employees__c <=249
AND
Booking_start__c value is updated and not equals to previous value and Booking_start__c == null
Please validate the trigger thoroughly before moving it to live ...!!!
Have a great day ..!!!
All Answers
Also please make to update Behaviour_score__c with correct API name
Please mark as best answer if the above helps .......!!!!
How would you like to have the criteria between 3 fields.
Example
1. When 3 fields are true
2. When anyone of the 3 fields are true
3. 1 field is true and anyone among other 2 is true.
Please let me know, when you would like to trigger. So that can I can form the critera statement
Thank you very much for your help on this.
I want it to trigger when all 3 fields are true so eg Behaviour Score >=100, No. of Employees <=249 and Booking Start =null.
Thanks again
Please make sure that API names of Booking_start__c and No.of Employees__c are correct on Lead. Also on Lead updates does Booking start contains data other than null ?
This trigger will be executed only for below
1. while inserting new Lead records with all 3 conditions to True
L.Behaviour_score__c >= 100 && L.No.of Employees__c <=249 && L.Booking_start__c == null
2. While updating exisiting Lead record with all 3 conditions to True
Behaviour_score__c value is updated and not equals to previous value and Behaviour_score__c >=100
AND
No.of Employees__c value is updated and not equals to previous value and No.of Employees__c <=249
AND
Booking_start__c value is updated and not equals to previous value and Booking_start__c == null
Please validate the trigger thoroughly before moving it to live ...!!!
Have a great day ..!!!