Adding options which are not present in Metadata in a Option Set in Dynamics-365

561 views Asked by At

I have created an option set field in an entity in CRM that has 3 options.

Now I want to add another option based on some conditions dynamically(maybe when the page loads).

Is it possible to do that?

Thanks in advance.

1

There are 1 answers

2
James Wood On

To make sure it can save into the database and be available in other places like views.

You should create an option set with every possible value.

Then use JavaScript to hide the options you don't want.

removeOption

formContext.getControl("your_control").removeOption(1);