web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Dependant Option Set for Form

(0) ShareShare
ReportReport
Posted on by 10

Hello

I am trying to create a dependant option set for Leads in the Sales Hub.

The dependant option set will be for Lead source. Please see below;

Parent Field Dependant Field
Walk-In
Email
Event Launch Event
Sponsorship Event
Referral Partnership referral
Customer referral
Phone

So, some sources do not have dependant fields, however if selecting Event then it will show the dependant fields for events. If selecting Referral then it will show the dependant fields for referrals.

I found a few tutorials on the MS website and in this forum that included an XML and JS file, but they seemed to be for an older version of CRM and I could not load the JS file into the form even though it was a web resource.

Any help regarding this would be fantastic.

Thank you

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,216 User Group Leader on at

    Hi, 

    You can use some javascript for this scenario. Please refer to this sample code: 

    docs.microsoft.com/.../gg594433(v=crm.8)

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    If you are using Sales Hub, you are already on UCI, why not try the following PCF control?

    0310.ScreenClip.png

    https://pcf.gallery/dependent-optionset/

  • Morn Profile Picture
    10 on at

    Hi Kokulan

    This looks promising so I downloaded the solution and imported, then created my option sets and created the js web resource.

    However when I try and execute in the form I receive the message in the dependant field "error loading dependency configuration"

    Have you experienced this before?

    Thank you

  • Suggested answer
    David Yu Profile Picture
    on at

    Hi,

    You may follow the following sample code to generate the one for v9.

    docs.microsoft.com/.../gg594433(v=crm.8)

    Meanwhile, you may check whether the following open source can help you on the request.

    github.com/.../DependentOptionset_PCF

  • Morn Profile Picture
    10 on at

    Hi David

    Than you for your reply. 

    For the open sourced version I found this helpful, however I receive an error in my form stating "error loading dependency configuration"

    For the first link you provided I could not find the relevant section for 'onload event', and additionally I only required parent set and child set, not the 3rd level options.

    Thank you

  • Lead Entity Fields Not getting Profile Picture
    50 on at

    how can we add in UCI PCF control to filter the dependent Option set values

  • Lead Entity Fields Not getting Profile Picture
    50 on at

    how can we add in UCI PCF control to filter the dependent Optionset

    [quote user="Kokulan"]

    Hi

    If you are using Sales Hub, you are already on UCI, why not try the following PCF control?

    0310.ScreenClip.png

    https://pcf.gallery/dependent-optionset/

    [/quote]
  • Guido Preite Profile Picture
    54,086 Moderator on at

    There is also DOSM (Dependent Option Set Manager) that can assist you on creating a dependent option set (works also on Unified Interface)

    github.com/.../DOSM

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

News and Announcements

Season of Giving Solutions is Here!

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 > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 101

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 66 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans