Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Javascript help - Creating multiple Dependent OptionSets

Posted on by 3,070

Hi all,

I'm hoping someone with more javascript knowledge than me can help.  I've been following the instructions on the MSDN sample to create Dependent OptionSets (https://msdn.microsoft.com/en-us/library/gg594433.aspx) on my Account entity.  I've managed to implement this successfully, however I am having a bit of trouble with utilising it twice on the same form.  

To give a brief overview:  We currently have a "Region" and "Sub-Region" selector on our account form, and the "Sub-Region" OptionSet is filtered dependent upon the "Region" selected.  I've managed to get this working by following the instructions in the MSDN sample.

I've now been requested to add a filter to select a business type based on 3-tiered options (i.e. Selecting a Tier One option filters the Tier 2 options, which then filters the Tier 3 options).  Again I can get this to work following the instructions in the MSDN sample.

My problem: I cannot get both dependent OptionSets to operate on the same form.  I am assuming it is a function conflict, but my java skills are fairly limited so I'm hoping someone can offer some advice

Thanks,

Ryan

*This post is locked for comments

  • Verified answer
    Ryan Maclean Profile Picture
    Ryan Maclean 3,070 on at
    RE: Javascript help - Creating multiple Dependent OptionSets

    thanks for your help guys.  

    HIMBAP, I was using the CRM Option Sets solution provided by Guido, and he very kindly offered me some help, and that has resolved the issue, and i think the update is now available on his website for downloading.

    For clairification though, the issue was related to a timeout within the script, and the fact that I had two JSON configurations using the same functions.  The issue was resolved by combining the JSON configurations, so there should only be one JSON per form.

    Thanks,

    Ryan

  • Suggested answer
    M.T. Eikelenboom Profile Picture
    M.T. Eikelenboom 5,241 on at
    RE: Javascript help - Creating multiple Dependent OptionSets

    Can you post your code? My guess is that you are reusing some code where it shouldn't be reused.

  • Ryan Maclean Profile Picture
    Ryan Maclean 3,070 on at
    RE: Javascript help - Creating multiple Dependent OptionSets

    Hi Mahen,

    I've tried using this tool and, while it works fine for creating one set of dependent optionsets, i can't seem to get it to function if there are two sets on the same form.

    Thanks,

    Ryan

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Javascript help - Creating multiple Dependent OptionSets

    Hi Ryan,

    Did you try this tool: crmoptionsets.azurewebsites.net

    it will be easy for you.

    Thanks

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans