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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Issue in setting default value for dependent optionset

(0) ShareShare
ReportReport
Posted on by 245

Hi,

I have 4 optionset fields say Department,Sector,Subdepartment,Section.Which is dependent as below,

Department->Sector->Subdepartment->Section.

Ex :HR department has 2 sector whereas other departments has only one sector.So except HR dept i need to set the sector value by default based on Department.

I tried using Business rule also using Javascript,sector value is getting assigned but subdepartment and section is locked say dependent optionset is not recognising the sector change.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    pavanmanideep Profile Picture
    1,331 on at

    Please refer to this post..

    community.dynamics.com/.../272751

    You can also try with this dependent optionset generator

    crmoptionsets.azurewebsites.net

  • DivyaBharathi Profile Picture
    245 on at

    Hi Pavan thanks for the response already im using dependent Optionset for 4 field but im facing issue in setting default value for sector field when i use dependent optionset

  • Suggested answer
    pavanmanideep Profile Picture
    1,331 on at

    Couple of things to verify

    1.Make sure this field isn't locked by default on the form..

    2. Are you locking this field else where in your script...

    3. Are you getting any script error, what is the value it is getting set when u try to debug...also verify how you were trying to set this value...

  • DivyaBharathi Profile Picture
    245 on at

    1.Since its a dependent Optionset its locked till the parent field chnages.

    2.No

    3.No

    Department <-Sector<-Subdepartment<-Section.I have created Json file with the dependent Optionset values accordingly.Now i have to set default value for sector because some sectors have only single value some have 2 values . But if i set default value the onchange of sector is not recognized.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans