Hello,
for our salesorder Entity we are trying to disable some statecode options from the dropdown field with javascript. We dont want to remove them. The problem with removing is, that it looks like an empty field when its selected via ribbon button.
Why we want to do this? When we remove the option it is (and needs) still to be clickable in the ribbon.On the ribbon are the standard buttons(from Microsoft) to change the state.These are the buttons with the close dialog
The Main problem is that some states are needed to be set via ribbon button and others via the dropdown on the formular. and we want to hide the ribbon options in the dropwdown of the formular. Because these ones throwing an error.
any Ideas?
Hi,
It's great to hear that the issue has been solved and thanks for the query.
Hello I wanted to disable it like make it grey and not clickable. when you remove it completely from the dropdown and set it via ribbon you see just '---' in the dropdown...
But I solved it with a workaround. I now remove the statuscodes and add the again.
Hi,
I have tested to hide the options with the following JavaScript:
Xrm.Page.getControl("statecode").removeOption(3);
It will not be shown as an empty field.
Or you may mean that you'd like to remove all the options and then it will show the Select only.
Would you please attach some screenshots to describe your issue more clearly?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156