Saturday, December 7, 2024

Read And Write The Dynamics 365 CRM OptionSet Field Using Java Script

   Follow below code to read and write the OptionSet field of Dynamics 365 CRM.

1. To Read the value:
Below code are read the Name field value and store into empCountry variable.

var empCountry = formContext.getAttribute("min_country")?.getValue();


2. To Set/Update value:
Below code will be check the Name field contains data, if it contains then set/update the address1 field value.

if (empCountry !== null && empCountry !== undefined)
{
    formContext.getAttribute("min_country1").setValue(empCountry);
}

Hide And Show The Dynamics 365 CRM Button Based On Logged In User Security Roles

 In this post I am going to explain how you will hide and show the Ribbon/Command buttons based on logged in user security rule. I have one ...