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
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"
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 ?
yes
Have you tried with chrome ?
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);
}
i visited this link, all values inserted in the picklist but user can't select any value !
Please refer below.
sliong.wordpress.com/.../crm-2011-add-new-picklist-option-using-javascript
Mansoor
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,232 Super User 2024 Season 2
Martin Dráb 230,064 Most Valuable Professional
nmaenpaa 101,156