Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

2 Fields requiring Dependent Option Sets in the same form not working

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

I have 2 different fields that require dependent option sets to be used in the same form and I am using the SDK for the same (following this link - https://msdn.microsoft.com/en-us/library/gg594433.aspx). My problem is, if I'm using dependent option set for just 1 field, it works. However when I try to use it for 2 different fields, only the 2nd one works. Some research on the same led me to the probable reason as being using same function name for 2 different events in the same form (i.e., SDK.DependentOptionSet.init would be the function name for both the events). So anyone have any idea how to fix this? 

Thanks!

*This post is locked for comments

  • Testuser12 Profile Picture
    Testuser12 270 on at
    RE: 2 Fields requiring Dependent Option Sets in the same form not working

    Hi guys,

    Wondering if someone can assist with the merging of two JSON statements into one as discussed in this thread.

    I have to two seperate sets of dependent fields and when i merge the JSON statements into one, i recieve an error.

    Just curious as to where exactly i insert my second JSON statement, do i do it within a specific set of tags within the file or i do i just simply paste one in after the other.

    Any help would be appreciated.

    Thanks

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 2 Fields requiring Dependent Option Sets in the same form not working

    [quote user="Guido Preite"]

    as I wrote before you need to create a single configuration (JSON) file with both definitions, with a single init. Use my Generator and follow the instructions

    [/quote]I combined both the JSON files into one file, and it worked! Thanks a lot, Guido Preite!

  • Verified answer
    Guido Preite Profile Picture
    Guido Preite 54,069 Super User 2024 Season 1 on at
    RE: 2 Fields requiring Dependent Option Sets in the same form not working

    as I wrote before you need to create a single configuration (JSON) file with both definitions, with a single init. Use my Generator and follow the instructions

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 2 Fields requiring Dependent Option Sets in the same form not working

    [quote user="Mahender"]

    I have see this issue before when work with multi dependent optionset , but don't remember what was the issue, can you try to use crmoptionsets.azurewebsites.net and see if that helps ? using same method should not cause this issue becase they will act based on the parater.

    [/quote]I tried it but its not working. I read somewhere that if you use the same function twice, it will just pick up the 2nd instance of the function and that is exactly what happened to me.  Only the 2nd function is working, inspite of the parameters being different for both the functions (i.e., 2 different JSON files).

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: 2 Fields requiring Dependent Option Sets in the same form not working

    [quote user="Guido Preite"]

    when you have more than two dependent optionsets in the same form, use a single configuration with all the definitions inside, don't do two separate definitions and two inits, in that case will not work

    [/quote]But I have 2 different parameters for both the init functions (i.e., 2 different JSON files), so I need to do it twice. Is there any other way that I can do it just once?

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,069 Super User 2024 Season 1 on at
    RE: 2 Fields requiring Dependent Option Sets in the same form not working

    when you have more than two dependent optionsets in the same form, use a single configuration with all the definitions inside, don't do two separate definitions and two inits, in that case will not work

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: 2 Fields requiring Dependent Option Sets in the same form not working

    I have see this issue before when work with multi dependent optionset , but don't remember what was the issue, can you try to use crmoptionsets.azurewebsites.net and see if that helps ? using same method should not cause this issue becase they will act based on the parater.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans