Hello,
I'm looking at updating to the latest SDK version 4.26 but getting error with the popupTemplate.content property and found that it started in 4.16. Is there something that I would need to change in 4.16 to fix that error?
In 4.15 no issue, the popup template loads.

Then with 4.16 it doesn't load the content, just the title.

-- Code to create the FeatureLayer and assign the popup template
var featureLayer = new FeatureLayer({
url: searchLayerInfoList[i].url,
layerId: searchLayerInfoList[i].id,
// configure the feature layer to return all fields
outFields: ["*"],
popupTemplate: getPopupTemplate(displayTitle)
});
-- Creating the popup template. Fails on the content retrieval in 4.16+
function getPopupTemplate(displayTitle) {
var template = {
title: displayTitle,
//content: generateCustomContent,
content: function (target) {
var fields = [
{
"fieldName": "OBJECTID",
"label": "OBJECTID",
"visible": true
}];
return [{ type: "fields", fieldInfos: fields }];
},
actions: [customZoomAction]
}
template.overwriteActions = true;
return template;
}
Best,
Yim