Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Dependent drop down

Posted on by 1,075

Hello

I have a requirement where, i should create a drop down for country names and based on country names, states should appear to select. I'm using dynamics 365 Online.

I'm a fresher. If anybody could guide me step by step, I'll have a great chance to learn. 

Regards

Sumaira Noor

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,075 on at
    RE: Dependent drop down

    Thanks for the help Ravi. That link does'nt meet the solution i expect.

    However Thanks again.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Dependent drop down

    Hi Sumaira,

    I havent used any in my projects but a quick google search returned me this https://api.printful.com/countries which contains the list of countries with the states from US, Australia & cananda i guess.

    Hope this helps.

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,075 on at
    RE: Dependent drop down

    Hi Ravi

    Many many thanks for the help

    It worked.

    Could you please let me know if i can get any API online where all the country and its states names are listed in that option set.

    Regards

    Sumaira Noor

  • Verified answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Dependent drop down

    Hi,

    Its a managed solution which you need to import in your organization.  As mentioned in the tools documentation, you first need to create an empty JavaScript library with just [] content.

    Once the solution is imported, you need to do some more configuration by opning the solution.

    This tools works fine as I have tested it just now and its working as expected.

    dependent2.png

    dependent1.png

    Follow the instruction and see if this works for you, if not, share the error details here (please mentioned my name while responding so that I get direct notification e.g. "Hi Ravi")

    Hope this helps.

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,075 on at
    RE: Dependent drop down

    That tool is'nt working. It throws this error.

    The WebResource DependentOptionSet.js (gp_/js/DependentOptionSet.js) is not a valid configuration for Dependent OptionSet

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,075 on at
    RE: Dependent drop down

    Thanks again for the quick help.

    Yes I have to use the drop down for my requirement.

    Thanks for the link

    crmoptionsets.azurewebsites.net/

    Could you please let me know how i can generate option set using that.

    As I'm new to this, I have no idea about it

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Dependent drop down

    That article is for CRM 2015 and may not work in Dynamics 365. Do you "have to" use optionset for this requirement? Asking as this can be achieved very easily if you create reference entity for Country & States. You can do use out of box related lookup filtering without any code.

    Refer this blog: www.powerobjects.com/.../

    If you have to use optionset then you can try crmoptionsets.azurewebsites.net/

    Hope this helps.

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,075 on at
    RE: Dependent drop down

    Thanks for your response. I followed this article [View:https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2015/developers-guide/gg594433(v=crm.7)?redirectedfrom=MSDN:750:50]

    and I'm getting this error every time i load the form.

    6371.Capture.PNG

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Dependent drop down

    Can you share what have you done and what error you are getting. Some screenshot will help.

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,075 on at
    RE: Dependent drop down

    Thanks for the response, i followed it exactly step by step, I'm getting script error every time i open the form.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans