Hi
Hope somebody can help. I'm trying to create some code that checks an associated (let's call it 'Preference) record's value when selecting the same value from a new ('Preference') record for a contact. It should then display an error message if that value within an existing ("Preference') record exists. Sorry if that's a bit vague. New to this.
Any help would be super appreciated!
The latter is probably favourable. Will give it a go when I get a chance.
Hi,
If you want to check/retrieve value from other record in JavaScript, you will have to use WebAPI to query that record. Take a look at the below article-
Hope this helps.
Hi,
may I ask, why don't you use a duplicate detection rule?
https://rocketcrm.co.uk/dynamics-365-duplicate-detection-rules/
It seems to me like the perfect choice to fulfill your requirement!
If you wanna do it using ha, then write down a function that retrieve the preference record and add a validation function like this:
hihaj.com/howto-client-side-validation-of-dynamics-crm-forms-1c84cd02c15a
Hope it helps!
If you found the answer helpful for you or other readers, please mark as Verified.
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156