Skip to content

Instantly share code, notes, and snippets.

Created November 12, 2015 15:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0a15a625583c5b68bc11 to your computer and use it in GitHub Desktop.
Save anonymous/0a15a625583c5b68bc11 to your computer and use it in GitHub Desktop.
Affects method: `XrmServiceToolkit.Soap.BusinessEntity.prototype.deserialize()`
//@Credit: Thanks for Tanguy92's code from CodePlex
else if (entCv.type === "AliasedValue") {
var currentNode = tempNode.childNodes[2];
entCv.value = getNodeText(currentNode);
// In next line replace "a:EntityReference" with "EntityReference"
if (currentNode.attributes.getNamedItem("i:type").nodeValue.split(":")[1] === "a:EntityReference") {
entCv = new xrmEntityReference();
entCv.type = "EntityReference";
entCv.id = getNodeText(currentNode.childNodes[0]);
entCv.logicalName = getNodeText(currentNode.childNodes[1]);
entCv.name = getNodeText(currentNode.childNodes[2]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment