Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Four Dependent Option set

(0) ShareShare
ReportReport
Posted on by 445

Hi,

I've created Dependent option set using the Microsoft article. JS script and using XML file.

I've four option set fields.

Based on the first three field, fourth field will be showing options.

In the fourth field, same options could be occurred based on the different conditions on the first three fields.

Kindly direct me to achieve this.

Thanks

*This post is locked for comments

  • Elangamban Profile Picture
    Elangamban 445 on at
    RE: Four Dependent Option set

    Thanks for the reply. Yes, I have achieved through JavaScript only.

  • Verified answer
    gdas Profile Picture
    gdas 50,089 on at
    RE: Four Dependent Option set

    Hi ,

    For me javascript is easiest solution in this type of scenario. Just fire onchange of each three field and based on those three options set value add and remove 4th optionset value.

    function OnchangeOptionSet() {

       var optionSet = Xrm.Page.ui.controls.get("new_myoptionset4");

       var optionSetValues = optionSet.getAttribute().getOptions();

       optionSet.clearOptions();

       optionSetValues.forEach(function (element) {

        // Add condition to check other three opoinset value and add remove 4th optionset value

           if (element.value == "831260009" || element.value == "831260008")

               optionSet.addOption(element);

           if (element.value == "831260008" || element.value == "831260008")

               optionSet.addOption(element);

       });

    }

  • Elangamban Profile Picture
    Elangamban 445 on at
    RE: Four Dependent Option set

    I'm also following the same article. The problem is in the sample_type all values are unique. In my case it will not be.

    category01--->subcategory01--->subcategory02----->type01

    category01--->subcategory02--->subcategory02----->type03

    category02--->subcategory01--->subcategory03----->type02

    .

    .

    .

    Hope I'm clear. Thanks

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Four Dependent Option set

    Hi,

    Did you check this: crmoptionsets.azurewebsites.net

  • Suggested answer
    Arpit Shrivastava Profile Picture
    Arpit Shrivastava 7,518 User Group Leader on at
    RE: Four Dependent Option set

    Hello,

    Please check this article for the same:

    https://msdn.microsoft.com/en-us/library/gg594433(v=crm.8).aspx

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.


    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

     

     

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans