Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
Posted on by

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
    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
    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
    54,075 Moderator 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
    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
    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
    54,075 Moderator 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
    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,886 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,768 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans