SBX - Search With Button

SBX - Forum Post Title

dependent option sets. I am using sdk.dependentoptionset.js sample code in sdk and have configured everything properly. but even after selecting parentfield option , childfield(dependentfield) lock is not releasing.

Microsoft Dynamics CRM Forum

murali101 asked a question on 13 Aug 2018 2:05 AM
My Badges

Question Status

Suggested Answer

hi 

   please do suggest me.it would be of lot of help.

thank you

Reply
Rawish Kumar responded on 13 Aug 2018 3:04 AM
My Badges
Suggested Answer

Hi There,

It would be difficult to find the root cause this way. you will have to dig in further.

Put a debugger in the script,  hit f12 on the browser  and then try to add option - you should see what is happening behind the scene and there should be an error in the console.

Reply
murali101 responded on 13 Aug 2018 5:01 AM
My Badges

hi rawish

thanks for the reply. when I press f12 I am getting this error in the console "Request header LoginRequestCorrelationId was not present in the Access-Control-Allow-Headers list." do u know what it means?

thank you

Reply
murali101 responded on 13 Aug 2018 7:14 AM
My Badges

hi 

 when I try to debug the code.i am getting source map error.

please help me.

thank you.

Reply
Mohsin Ali responded on 13 Aug 2018 7:18 AM
My Badges

Please follow following walk-through this might give you better understanding of dependent option sets.

https://balugajjala.wordpress.com/2017/03/24/dependent-picklist-optionset-in-crm-2016/

Reply
Mohsin Ali responded on 13 Aug 2018 7:18 AM
My Badges

Please follow following walk-through this might give you better understanding of dependent option sets.

balugajjala.wordpress.com/.../dependent-picklist-optionset-in-crm-2016

Reply
murali101 responded on 13 Aug 2018 7:32 AM
My Badges

hi mohsin Ali ,

I have followed the same steps given in your link and have configured properly.now when try to debug.i am getting source map error.do you know what it means.pls help

thank you

Reply
Akanksha Ranjan responded on 13 Aug 2018 10:52 AM
My Badges
Suggested Answer

Hi Murali,

This error means that the mapping you have given in the XML is not correct.

Please map the XML with correct schema and try again, if still doesn't help please share the screen shot.

Thanks

PS: Please mark the answer as verified if found helpful.

Reply
murali101 responded on 14 Aug 2018 3:39 AM
My Badges

HI akanksha,

this is  my xml code and two option sets called state and city_ .

 <DependentOptionSetConfig entity="Lead" >
 <ParentField id="new_state"
              label="state">
  <DependentField id="new_city_"
                  label="city_" />
  <Option value="100,000,000"
          label="karnataka">
   <ShowOption value="100,000,000"
               label="bangalore" />
   <ShowOption value="100,000,001"
               label="mangalore" />
  </Option>
 
  <Option value="100,000,001"
          label="Andrha_Pradesh">
   <ShowOption value="100,000,002"
               label="hyderabad" />
   <ShowOption value="100,000,003"
               label="nellore" />
   <ShowOption value="100,000,004"
               label="vishakpatnam" />
   <ShowOption value="100,000,005"
               label="chittoor" />
  </Option>
 </ParentField>
</DependentOptionSetConfig>

 

two option sets- state and city_

 

 

 

Reply
murali101 responded on 14 Aug 2018 3:45 AM
My Badges

hi akanksha

 sorry I have shared same screenshot of city option set twice.this is one more.

Reply
Akanksha Ranjan responded on 14 Aug 2018 1:07 PM
My Badges
Suggested Answer


Hi Murli, 

I have observed that the schema and label is not correct in the XML. 

Please verify XML.

You can refer this link : https://thabisomotloung.wordpress.com/2015/02/17/dependent-option-sets-in-ms-crm-2015/

<DependentOptionSetConfig entity="Lead" > --write the correct schema--
 <ParentField id="new_state"
              label="state">-- write the lable name not the display name--
  <DependentField id="new_city_"
                  label="city_" />
  <Option value="100,000,000"
          label="karnataka">
   <ShowOption value="100,000,000"
               label="bangalore" />
   <ShowOption value="100,000,001"
               label="mangalore" />
  </Option>
 
  <Option value="100,000,001"
          label="Andrha_Pradesh">
   <ShowOption value="100,000,002"
               label="hyderabad" />
   <ShowOption value="100,000,003"
               label="nellore" />
   <ShowOption value="100,000,004"
               label="vishakpatnam" />
   <ShowOption value="100,000,005"
               label="chittoor" />
  </Option>
 </ParentField>
</DependentOptionSetConfig>

 

<DependentOptionSetConfig entity="Lead" >
 <ParentField id="new_state"
              label="state">
  <DependentField id="new_city_"
                  label="city_" />
  <Option value="100,000,000"
          label="karnataka">
   <ShowOption value="100,000,000"
               label="bangalore" />
   <ShowOption value="100,000,001"
               label="mangalore" />
  </Option>
 
  <Option value="100,000,001"
          label="Andrha_Pradesh">
   <ShowOption value="100,000,002"
               label="hyderabad" />
   <ShowOption value="100,000,003"
               label="nellore" />
   <ShowOption value="100,000,004"
               label="vishakpatnam" />
   <ShowOption value="100,000,005"
               label="chittoor" />
  </Option>
 </ParentField>
</DependentOptionSetConfig>

 

Reply
murali101 responded on 14 Aug 2018 11:57 PM
My Badges

hi 

 akanksha I have given proper schema name and label name for option sets. and I am also sure abt it because child field is getting locked onload of form (which tells xml has been mapped properly) . but child field is not releasing the lock on selection of option on option sets in parentfield. how can I know whats wrong and why child is not releasing its lock on selection.

Reply
murali101 responded on 15 Aug 2018 12:03 AM
My Badges

hi akanksha,
      please check this creenshot. I jus changed label names and specified the same in xml file. I also used proper schema for out of the box lead entity which is "lead". please suggest if we can achieve same functionality by any other way (except lookups and creating entities). pls help 

thank you

Reply
Rawish Kumar responded on 13 Aug 2018 3:04 AM
My Badges
Suggested Answer

Hi There,

It would be difficult to find the root cause this way. you will have to dig in further.

Put a debugger in the script,  hit f12 on the browser  and then try to add option - you should see what is happening behind the scene and there should be an error in the console.

Reply
Akanksha Ranjan responded on 13 Aug 2018 10:52 AM
My Badges
Suggested Answer

Hi Murali,

This error means that the mapping you have given in the XML is not correct.

Please map the XML with correct schema and try again, if still doesn't help please share the screen shot.

Thanks

PS: Please mark the answer as verified if found helpful.

Reply
Akanksha Ranjan responded on 14 Aug 2018 1:07 PM
My Badges
Suggested Answer


Hi Murli, 

I have observed that the schema and label is not correct in the XML. 

Please verify XML.

You can refer this link : https://thabisomotloung.wordpress.com/2015/02/17/dependent-option-sets-in-ms-crm-2015/

<DependentOptionSetConfig entity="Lead" > --write the correct schema--
 <ParentField id="new_state"
              label="state">-- write the lable name not the display name--
  <DependentField id="new_city_"
                  label="city_" />
  <Option value="100,000,000"
          label="karnataka">
   <ShowOption value="100,000,000"
               label="bangalore" />
   <ShowOption value="100,000,001"
               label="mangalore" />
  </Option>
 
  <Option value="100,000,001"
          label="Andrha_Pradesh">
   <ShowOption value="100,000,002"
               label="hyderabad" />
   <ShowOption value="100,000,003"
               label="nellore" />
   <ShowOption value="100,000,004"
               label="vishakpatnam" />
   <ShowOption value="100,000,005"
               label="chittoor" />
  </Option>
 </ParentField>
</DependentOptionSetConfig>

 

<DependentOptionSetConfig entity="Lead" >
 <ParentField id="new_state"
              label="state">
  <DependentField id="new_city_"
                  label="city_" />
  <Option value="100,000,000"
          label="karnataka">
   <ShowOption value="100,000,000"
               label="bangalore" />
   <ShowOption value="100,000,001"
               label="mangalore" />
  </Option>
 
  <Option value="100,000,001"
          label="Andrha_Pradesh">
   <ShowOption value="100,000,002"
               label="hyderabad" />
   <ShowOption value="100,000,003"
               label="nellore" />
   <ShowOption value="100,000,004"
               label="vishakpatnam" />
   <ShowOption value="100,000,005"
               label="chittoor" />
  </Option>
 </ParentField>
</DependentOptionSetConfig>

 

Reply

SBX - Two Col Forum

SBX - Migrated JS