Hi Aileen,
I have a similar issue. I am using Dynamics 365. I am trying to copy the entity fields and default in the new form for cloning purpose. Except lookup field on the BPF and multiselectpicklist on the form, I am able to copy all other fields and default it to the new form.
//Snippet to copy existingcase field from the BPF
if (attributeName == "existingcase" && attributeType == "lookup") {
//var existingCase = Xrm.Page.getControl("existingcase").getAttribute().getValue();//I tried using "header_process_existingcase" but still did not work
var existingCase = Xrm.Page.getAttribute("existingcase").getValue();
var existingCaseId = existingCase[0].id;
var existingCaseName = existingCase[0].name;
var existingCaseType = existingCase[0].entityType;
if (existingCaseId != null && existingCaseName != null) {
parameters["existingcase"] = existingCaseId;
parameters["existingcasename"] = existingCaseName;
parameters["existingcasetype"] = existingCaseType;
}
}
I get the value on the LHS but I get an error - CRM Parameter Filter - Invalid parameter 'existingcasename=Clone Record Test 1' in Request.QueryString
//snipped to copy multiselectpicklist
else if (attributeType == "multiselectoptionset") {
var options = Xrm.Page.getAttribute(attributeName).getText();//I also tried using getSelectedOption(). Still this did not work
parameters[attributeName] = options;
}
I get the value on the LHS but I get an error for multiselectpicklist - Newtonsoft.Json.JsonReaderException: Error parsing positive infinity value. Path '', line 0, position 0.
Any suggestion would be appreciated.
Regards,
Ganesh A