I want to create new option set values dynamically, Is there any approach for that
I tried to use addOption(obj) method but dynamically created option are only available in UI side and Database couldn't add new created options
I want to create new option set values dynamically, Is there any approach for that
I tried to use addOption(obj) method but dynamically created option are only available in UI side and Database couldn't add new created options
I got this error when I will choose the newly added option from Option Set
I have tried same but, see all the added option are available on UI Side only In the database data couldn't added. Because of this getting error while storing the record
Hi Thanks for responding on my post , can you please share any example so I can take as reference
hi
you can use this JS code:
var low = {value : 100000000, text : "Low"};
var medium = {value : 100000001, text : "Medium"};
var high = {value : 100000002, text : "High"};
var pickList = Xrm.Page.getControl("control_name");
var options = pickList.getOptions();
for (var i = 0; i < options.length; i++)
pickList.removeOption(options[i].value);
pickList.addOption(low);
pickList.addOption(medium);
pickList.addOption(high);
Hello,
You can create a single line of text field and implement a PCF control to display the text field as an option Set.
Another option is to use a webressource for the rendering, and you will store the selected value as a single line of text.
André Arnaud de Cal...
293,099
Super User 2025 Season 1
Martin Dráb
231,884
Most Valuable Professional
nmaenpaa
101,156
Moderator