Notifications
Announcements
No record found.
Hi,
Is there a way to filter a multi-select option set on load of the form using javascript?
Thanks.
*This post is locked for comments
You can use JS code to remove and add values, which you can filter based on your condition, please check this post should help you to with sample code: community.dynamics.com/.../dynamics-365-v9-0-set-multi-select-option-set-values-using-jscript
The question isn't covered in that link. What the link covers is the programmatic adding and removing of the selected values.
To filter the available values in a multi-select option set you need to remove the values you are filtering away (in the same way that you would with a normal optionset).
Use context.getFormContext().ui.controls.getByName("attribute_name").removeOption(752240000);
Thanks Ben! This is what I need.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2