Wednesday, July 9, 2025

Add Remove Dynamics 365 CRM OptionSet Field Values

To remove Dynamics 365 CRM/CE OptionSet field value using Java Script you have to use the removeOption() and addOption().


// To Remove OptionSet option

// Option : C# Language    Value: 913420003
formContext.getControl("fieldSchemaName").removeOption(913420003);



// To Add OptionSet option

var optionAdd = { value: 913420003, text: "C# Language" };
formContext.getControl("fieldSchemaName").addOption(optionAdd);

No comments:

Post a Comment

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 ...