You need to sign in to do that
Don't have an account?
Parmeshwar Bhore 1010011
Write a triggers and Test Classes.
1.Write a trigger to prevent duplicate Account creation with same name, , email and phone.
2.When lead is getting created add ''DR'' prefix to all leads names.
3.Write test class for both triggers
2.When lead is getting created add ''DR'' prefix to all leads names.
3.Write test class for both triggers
Hi Parmeshwar,
You can implement all these features without actually writing code.
1. Preventing Account duplicates - write a simple matching + duplicate rule on Account.
Trailhead : https://trailhead.salesforce.com/content/learn/modules/sales_admin_duplicate_management
2. To add "DR" to all your leads during creation, you can write a flow / process builder with a field update action.
Hope this gives you the direction to start.
Best,
Vishal
For trigger to prevent duplicate Account creation check, https://www.syedtaha.com/salesforce-apex-triggers/salesforce-apex-trigger-to-prevent-duplicate-contacts-by-email-or-phone-number/897/
This link is for contact object, you will need to update to account object.
For 2nd check, https://stackoverflow.com/questions/32676117/adding-prefix-to-name-in-lead-using-triggers
Test class: https://developer.salesforce.com/forums/?id=9062I000000QuqqQAC
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you