Announcements
No record found.
hi,
i created two selectBox in the lead entity, each entity not contains any value, i need to add all values in javascript
who can help me ?
*This post is locked for comments
Please refer below.
sliong.wordpress.com/.../crm-2011-add-new-picklist-option-using-javascript
Mansoor
i visited this link, all values inserted in the picklist but user can't select any value !
my source code :
var options = getDepartmentForRegion(selectedRegion); var picklist = Xrm.Page.getControl(picklistName); picklist.clearOptions(); for(i=0;i < options.length; i++) { var opt = { value : options[i].name , text : options[i].name }; picklist.addOption(opt); }
Have you tried with chrome ?
yes
Updated source code :
var options = getDepartmentForRegion(selectedRegion); var picklist = Xrm.Page.ui.getAttribute(picklistName); for(i=0;i < options.length; i++) { var optionObject = document.createElement("option"); optionObject.value = options[i].name; optionObject.text = options[i].name; Xrm.Page.getControl(picklistName).addOption(optionObject); }always the same problem exist, when i selected value always the default value return "--"any solution ?
Solution:
i must define the value in the entity, after i used hide and show.
Dependent OptionSets (picklists) :
msdn.microsoft.com/.../gg594433.aspx but in the parameter i changed "sample_TicketDependentOptionSetConfig.xml" to "sample_TicketDependentOptionSetConfig"
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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Varsha deshpande 5
NeerajPawar 2
jlattimer 2