Get error on apply edits

227
1
09-06-2021 10:28 PM
MuhammadFayaz
Occasional Contributor

on(dom.byId("savePol"), "click", sendToAmana);


function sendToAmana(){
var featureLayer = map.getLayer(map.graphicsLayerIds[1]);
var graphicLayer = featureLayer.graphics;
console.log(graphicLayer);

acceptanceAwaited.applyEdits([graphicLayer], null, null, saved1, gotError1);


}

function saved1(saved) {
if (saved) {

alert("Successfully submitted to Amana");
}
}

function gotError1(error) {
if (error) {
alert("Somthing gone wrong");
}
}

 

I am passing an array of graphics to the feature layer , but the above code returns Error, Can anyone please tell me if something is wrong here.

0 Kudos
1 Reply
KenBuja
MVP Honored Contributor

What is the error you're getting and where does it happen?

0 Kudos