There is Account entity it is parent and contact entity it is a child while creating child record have to check all child records (need to check only child records under parent record) If child record Business phone number is already there then throw an error, else allow to create a child record
Hi Ravi
its working now i unregister the plugin and tried with register again its working thanks for supporting ravi
Hi,
Saving you mean update of record? If yes then this plugin may not work. For update, you need to register the plugib on update / pre operation and also change the logic slightly to retrieve the data from plugin images..
This is because when the plugin updates, you only get the changed values in the target i.e. if you just change phone number, in plugin only phone number will be available in the target property bag.
You eed to use the pligin images in pder to get the already stored data. You need to check the data in plugin images and target property.
Hope this helps.
yes goutam and i had checked the plugn by addng exception in first line plugin is not getting fire whilw creating contact record
Hi Sekhar ,
Could you please confirm you registered the plugin in pre-operation and the plugin is synchronous .
Then throw exception at beginning of your code to know that plugin is getting fire or not.
Problem is that am not getting any error in the contact form its allowing record to save
am saying code is working fine and while debugging the code its throwing error if already record exists with the same phone number
What error are you getting?
I know but its not throwing error in form, but code is working while debugging its throwing error
If there is "parent account" field has value in newly created contact and any other sub contact of that account has same number then it throw error on contact form as well.
Hi Goutam
Code is working fine i twice checked with debugging its working more than one record with same phone number its throwing error.
But Problem is that in contact form its not throwing any error while saving
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156