Write a trigger on Contact to Prevent the user to create duplicate Contact based on Phone if Phone number is already exist on related account in Salesforce | Apex trigger on Contact to do not allow create duplicate contact based Phone number if the contact with same phone exists in related account in Salesforce

Create Apex Trigger →

RestrictDuplicatePhoneOnContactTrigger.apxt [Apex Trigger]

Create Apex Class Controller →

duplicatePhoneOnContactCtrl.apxc [Apex Class Controller]

Final Output → To get source code live demo..



Easy to learn step-by-step online tutorial by www.w3web.net

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store