Hi
I'm working on something where I'm using Xrmquery.retrievemultiple to get information from multiple entities.
I require not only information from the base entity, I require the information from a second entity too.
However I'm only able to output from the original entity (crm_sestemplate).
Is it possible to retrieve the information I require?
I need both versions of the crm_place, and the crm_bookable
var fetch = '<fetch>';
fetch += '<entity name="crm_sestemplate" >';
fetch += '<attribute name="crm_name" />';
fetch += '<attribute name="crm_place" />';
fetch += '<link-entity name = "crm_seschannel" from = "crm_sessiontemplateid" to = "crm_sessiontemplateid" visible = "false" intersect = "true" alias = "a1">'
fetch += '<link-entity name = "crm_assesslconfig" from = "crm_assesslconfigid" to = "crm_assesslconfigid" >';
fetch += '<attribute name="crm_place" />'
fetch += '<attribute name="crm_bookable" />'
fetch += '</link-entity>'
fetch += '</link-entity>';
fetch += '</entity>';
fetch += '</fetch>';
XrmQuery.retrieveMultiple(x => x.crm_sestemplates).useFetchXml(fetch).execute((fetchResult) => {
if (fetchResult && fetchResult.length > 0) {
console.log("fetchResult[0].crm_venue_guid: " + fetchResult[0].crm_place_guid);
console.log("fetchResult[0].crm_name: " + fetchResult[0].crm_name);
} else {
console.log("no fetch result");
}
});
}