Hi,
I have been working on this for a several hours. I can't seem to see why this is not working.
function setSampleCodes() {
var iselect = "$select=new_sampleid,new_name"; var iorderby = "&$orderby=new_name"; var options = iselect + iorderby; SDK.REST.retrieveMultipleRecords("new_sample", options, sampleCodeCallBack, errorHandler, retrieveComplete); } function sampleCodeCallBack(retrievedData) { var opt = new Option(); if (retrievedData.length > 0) { for (var i = 0; i < retrievedData.length; i++) { opt[i].text = retrievedData[i].new_name; opt[i].value = retrievedData[i].new_Sampleid; } Xrm.Page.getAttribute("new_samplecode").setValue(opt); } } function retrieveComplete() { alert(Xrm.Page.gerAttribute("new_samplecodes").getValue()); } function errorHandler(error) { alert(error.message); }
*This post is locked for comments