Notifications
Announcements
No record found.
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!
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.
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-
community.dynamics.com/.../get-lookup-value-from-other-entity-and-set-it-on-the-form-using-web-api-in-microsoft-dynamics-crm
Hope this helps.
The latter is probably favourable. Will give it a go when I get a chance.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 70 Super User 2025 Season 2
Gerardo RenterÃa Ga... 43 Most Valuable Professional
Daniyal Khaleel 32 Most Valuable Professional