You need to sign in to do that
Don't have an account?
Arif Iqbal 5
Writing Trigger on Leads to update a record before insert
Hi Team,
I have a scenario on Lead Object. I want to write a trigger to do the following:
Ideally would like this to happen when we create the record before OR after Saving doesn't matter. I tried this with PB and worked fime but sime have implemented Duplicate management rules and there is a conflict with this PB hence disabled it and thought a trigger may be the way forward.
1. When a New Lead is created and the country on the standard Address fields = United Kingdom it should update a field National_c = National
2. When a New Lead is created and the country on the standard Address fields is NOT = United Kingdom it should update a field National_c = International
I have a scenario on Lead Object. I want to write a trigger to do the following:
Ideally would like this to happen when we create the record before OR after Saving doesn't matter. I tried this with PB and worked fime but sime have implemented Duplicate management rules and there is a conflict with this PB hence disabled it and thought a trigger may be the way forward.
1. When a New Lead is created and the country on the standard Address fields = United Kingdom it should update a field National_c = National
2. When a New Lead is created and the country on the standard Address fields is NOT = United Kingdom it should update a field National_c = International
Is National__c is a lookup field or a text field?
If its a text field go with workflow instead of process builder.
Thanks
Anil.B
Try to correct the duplicate management rules to allow multiple records have same picklist values .
other wise it will problem even you write a trigger also.
Thanks
Anil.B