Hi there,
I'm struggling to troubleshoot this internally, so reaching out to the community.
We have an issue related to a Ribbon button on a Form entity, which is working in Sandbox environments but not in Production.
The functionality is exactly the same on all instances, so we are wondering what the issue might be.
It seems to be related to the fetchXml function which has been working for years, but not not working in one instance.
The function is getting an error "fetchXml is not a function".
Here's an example below: we've generating a Word Document from a Document Template, and the code is getting the Template Id, which calls another function (which is the one failing based on the Consule log):
function getTemplateId() {
var id = null;
var fetch = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
"<entity name='documenttemplate' >" +
"<attribute name='documenttemplateid' />" +
"<attribute name='name' />" +
"<attribute name='documenttype' />" +
"<order attribute='name' descending='false' />" +
"<filter type='and' >" +
"<condition attribute='name' operator='eq' value='Buyers Grid Summary' />" +
"</filter>" +
"</entity>" +
"</fetch>";
fetchXml(
"documenttemplates",
fetch,
function(results) {
if (results.value.length > 0) {
id = results.value[0].documenttemplateid;
}
},
function(results) {},
false
);
return id;
}
Any help would be greatly appreciated! Thank you in advance!