I’ve found the function that runs when the user clicks close on the attribute inspector after creating a new feature in edit widget. I can get an alert to popup from inside that function. But the gp tool code never runs.
I’m wondering if its because its on a widget inside this web app builder framework? And not that same as being just a page using the javascript API??
_enableToAnswerEventForEditorATI: function() {
alert("geoproc");
//call geoprocessing service
gp = new Geoprocessor("https://xxxxx/arcgis/rest/services/EBP_Irwin/Overlay/GPServer/Overlay/submitJob");
gp.setOutputSpatialReference({wkid: 102100});
var params = { "returnZ": false, "returnM": false,"f": "json", };
gp.execute(params);