Notifications
Announcements
No record found.
Hi,
I know that it is possible to hide fields on forms based on certain value.
Is there possibility to show/hide dropdown values inside one field with business rules?
Thanks in advance
*This post is locked for comments
Hello,
you can't do this using business rules, you have to write java script for this. You can refer sample here: http://crmdynamicblog.blogspot.com.au/2012/06/remove-item-from-picklist.html
Hi ,
You need to write simple javascript to add or remove options from optionset field as per your business logic.
Here is sample code-
function OnloadOptionSet() {
var optionSet = Xrm.Page.ui.controls.get("new_myoptionset");
var optionSetValues = optionSet.getAttribute().getOptions();
optionSet.clearOptions();
optionSetValues.forEach(function (element) {
if (element.value == "831260009" || element.value == "831260008")
optionSet.addOption(element);
if (element.value == "831260008" || element.value == "831260008")
});
}
Hi Davor,
It is not possible with business rule, but you can achieve this by using javscript code.
If you want to hide optionset on some other field let say fieldX, then write a javascript code on Onchange event of FieldX,
Please check this link for the code,
vasubabumscrm.blogspot.com.au/.../addremove-optionset-value-at-run-time.html
Hope this helps,
Best Regards,
Shahbaaz
Hiding was the all drop down values that was according to the business rule on this I have some question regard this. I need to get answer so I wrote them all according to the grademiners so I can get all answer of the subjects I have in my mind.
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