I am trying to take an array of address, names, latitude, longitude, etc., then encoding them using JSON.stringify
to pass it to a 2nd HTML window that will then map the addresses.
I am hitting a problem when I use JSON.stringify
where my data is not fully coming through. Somewhere around 4000 characters my encoded string is truncating.
My issue comes at the line:
var customParameters = encodeURIComponent(JSON.stringify(AddressAray));
Full code section:
var AddressAray = new Array();
debugger;
for (i = 0; i < selectedItems.length; i++) {
//MY DATA IS ENTERED HERE AND WORKS FINE,
//ADDED TO AddressAray with all information.
AddressAray.push(MixedFields);
},
function (error) {
alert('GetCurrentUserTerritory: ' + error.message);
},
false);
}
var customParameters = encodeURIComponent(JSON.stringify(AddressAray));
Xrm.Utility.openWebResource("../WebResources/ddscrm_/webpages/CRMPRD.XRM.GoogleMaps.html",customParameters);
}