Version 9 Xrm Client Additions

This commit is contained in:
Scott Durow
2017-11-10 15:35:54 +00:00
parent 68cd19ffcf
commit e9105dbf18
2 changed files with 1426 additions and 229 deletions
+1403 -229
View File
File diff suppressed because it is too large Load Diff
+23
View File
@@ -175,3 +175,26 @@ ctrl.getLabel();
ctrl.setLabel("Label name");
ctrl.getVisible();
ctrl.setVisible(true);
// Demonstrate getEntityMetadata
Xrm.Utility.getEntityMetadata("account", ["telephone1"]).then(function(metadata){
console.log(metadata.Attributes["statuscode"].optionSet[0].Label.LocalizedLabels[0].Label);
});
// Demonstrate WebAPI RetrieveMultiple
Xrm.WebApi.retrieveMultipleRecords("contact", `?fetchXml=<fetch version='1.0' mapping='logical' distinct='false'>
<entity name='contact'>
<attribute name='fullname' />
<attribute name='telephone1' />
<attribute name='contactid' />
<order attribute='fullname' descending='false' />
<link-entity name= 'account' from='accountid' to='parentcustomerid' visible= 'false' link-type='outer' alias= 'a_dc9b80f8c78146d89fd6a3b610836975' >
<attribute name='accountratingcode' />
<attribute name='accountnumber' />
<attribute name='name' />
</link-entity>
</entity>
</fetch>`).then(function (response) {
console.log("Query Returned : " + response.entities.length);
});