I'm trying to set the value of the partylist from an array, which formatted from selected contacts. But I got exception
indxIds is undefined, tried a lot to figure it out but couldn't do so. Here is in the following what I'm trying to do:
//arrIds is the array of guids of selected contacts
var partyList = new Array();
for (var indxIds = 0; indxIds < arrIds.length; indxIds++) {
partyList[indxIds ] = new Object();
partyList[indxIds].id = arrIds[indxids];
partyList[indxIds].name = selectedname[indxids].Name;
partyList[indxIds].typename= 'contact';
}
Xrm.Page.getAttribute("to").setValue(partyList);
I need your kind help where I'm doing wrong.