Hi,
I can't seem to assign build and Option set from an array. I have tried converting to a string and that still does not work.
What am I doing wrong.
function sampleCodeCallBack(retrievedData) {
var opt = new Option();
var sampleCodeControl = Xrm.Page.getControl("new_samplecode")
if (retrievedData.length > 0) {
for (var i = 0; i < retrievedData.length; i++) {
var sample = retrievedData[i];
opt[i].text = sample.new_name; This is text
opt[i].value = sample.new_sampleId; This is Guid
sampleCodeControl.addOption(opt[i]);
}
Xrm.Page.getAttribute("new_samplecode").setValue(sampleCodeControl);
}
}


*This post is locked for comments
I have the same question (0)