Hi
I am trying to populate Lead Contacts into an OptionSet from JavaScript. I am getting errors. I have to populate either Lead or Account, Contacts in an Option Set.
function addLeadCustomFilterLookUp()
{
debugger;
try {
var param_LeadId = Xrm.Page.getAttribute("lead_optionSetValue"); // *** Get Lead Value from Option Set is Returning NULL Value
if (param_LeadId != null && param_LeadId != undefined) {
//alert('Lead ID Value: ' + param_LeadId);
//alert('Dekh Yaaar: ' + GetOptionSetValue("field_lead"));
//var Acct = Xrm.Page.getAttribute("field_casetypec");
//alert("Checking Value : " + Acct);
var filter = "<filter type='and'>" +
"<condition attribute='field_lead' operator='eq' value='" + param_LeadId + "'/>" +
"</filter>";
//filter booth services based on the booth selected in participant screen
Xrm.Page.getControl("primarycontactid").addCustomFilter(filter);
}
}
catch (e) {
throw new Error(e.message);
}
*This post is locked for comments