web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    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.

  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    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

  • Community Member Profile Picture
    on at

    [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?

  • Community Member Profile Picture
    on at

    [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).

  • Verified answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    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

    [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!

  • Testuser12 Profile Picture
    270 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans