Which data with which data do you want to compare?
Now I am getting data, can you please tell me how to compare data so that I can filter
I understand. You use parent. Xrm... which is deprecated. Please use as a reference the following link and match your code:
Thanks for the reply
I have to apply this code into a custom dashboard and it's not working there
Please try following code:
var fetchXML="<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
"<entity name='campaign'>" +
"<attribute name='name' />" +
"<attribute name='istemplate' />" +
"<attribute name='statuscode' />" +
"<attribute name='createdon' />" +
"<attribute name='campaignid' />" +
"<attribute name='typecode' />" +
"<order attribute='name' descending='true' />" +
"</entity>" +
"</fetch>";
fetchXML = "?fetchXml=" + encodeURIComponent(fetchXML);
Xrm.WebApi.retrieveMultipleRecords("campaign",fetchXML).then(
function success(result){
for(var i=0;i<result.entities.length;i++){
console.log(result.entities[i]);
}
},
function(error){
console.log(error.message);
}
);
Open console and check error message in Network > XHR.(The error request is marked with red color, error message can be found in the request response data.)
If you encounter any problem during the process, please share some screenshots, which may help to better understand your question.
Not Working
Hi Partner,
It seems that "result.entities.lenght" in your code should be "result.entities.length".
Regards,
Clofly
André Arnaud de Cal...
292,494
Super User 2025 Season 1
Martin Dráb
231,307
Most Valuable Professional
nmaenpaa
101,156