Hi, I posted similar query yesterday, but it did not seem to work. Basically, I have populated the values in the optionset already. Now I want to filter it out based on another optionset value, I tried the below code, every time I cleared the optionset and re-added the optionset values, then set the selected value, but I can see the list, while it did not get selected. now I am stuck on this.
Xrm.Page.getControl("header_statuscode").clearOptions();
var progress ={value:1,text:"In Progress"};
var hold = {value:2,text:"On Hold"};
var scheduled= {value:3,text:"Scheduled"};
var transferred ={value:491050000,text:"Transferred"};
Xrm.Page.getControl("header_statuscode").addOption(transferred);
Xrm.Page.getControl("header_statuscode").addOption(progress);
Xrm.Page.getControl("header_statuscode").addOption(hold);
Xrm.Page.getControl("header_statuscode").addOption(scheduled);
Xrm.Page.getAttribute("statuscode").setValue(2);
*This post is locked for comments
I have the same question (0)