Thursday, 14 November 2019

Suppress Duplicate detection through Plugin code

Hi All,

We have a requirement to suppress out of the box duplicate detection rule for some specific contact types using plugin. To achieve this we have written following plugin and registered on create of "PreValidation" stage.

This is code snippet of the plugin.

Show or Hide Optionset values based on the description in Dynamics 365 CE

If we want to show or hide the optionset values based on the customer lookup. For example if the contact is selected from the customer then show few options, else if account is selected show some other options.
Below are steps to follow.
1) Add the description to the optionset values in Dynamics CRM as shown in the below image. If you want to show the particular option for both contact and account entity type then add description as "account;contact;"


2) Write the following javascript code on change of the customer lookup field on the form properties.