Hi,
I made a geo region field and dependent option set (picklist) for geo sub-regions. Both option sets. I tested it and it worked fine. Using this:
https://msdn.microsoft.com/en-us/library/gg594433.aspx
When I added a business rule to auto-fill the geo region based on the province field from the address, it fills in my geo region with the value I set from the option set, but it doesn't trigger the geo sub-region picklist to populate.
If I manually click on the geo region it triggers the sub-region list, but that defeats the purpose of the auto-fill rule.
Is there a way to trigger the sub-region list once the business rule applies?
Or do I have to scrap the idea of auto-filling the geo region field and get users to manually select it so the correct picklist applies? It will be redundant clicking for users.
Thanks
*This post is locked for comments
Thanks Drew, it worked when I set 1 region in the field attribute where "123" was. I have several regions, how can I write the function so that it will trigger for each region?
I don't know javascript, should I use an IF THEN fireOnChange function multiple times for each? or is there a way to write IF (region1 OR region2 OR region3 ) THEN fireOnChange
What should the code look like?
eg. region1, region2, region3
This is the original code:
function businessrule_trigger_js() {
Xrm.Page.getAttribute("Field_B").setValue("region1");
Xrm.Page.getAttribute("Field_B").fireOnChange();
}
Thanks
Hi Cynthia, I think the following article discusses the same problem you are having. In the notes you will see the same issue occurs in 2016 as well. Hope this helps to fix the issue.
www.wipfli.com/BlogPost_MCRM_Blog_012715_BusinessRulesConflict.aspx
Thanks,
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