Hello Experts i am setting a lookUp value in Account Entity by using Following Code but the Lookup is not changing What is wrong with this Code. I am using SOAP Request and Getting All Values but unable to Set the Lookup.
Please Suggest.
var lookup = new Array();lookup[0] = new Object();
lookup[0].id = retrieved.results[0].TerritoryId;
lookup[0].name = retrieved.results[0].Name;
lookup[0].entityType = "account";
Xrm.Page.getAttribute("territoryid").setValue(lookup);
I am calling the JS method onChange Event of a field.
Please Suggest
Thank you
saroj