Select to view content in your preferred language

ApplyEdits() Issue

1275
2
03-03-2011 04:39 AM
DouglasBraeckel
Deactivated User
I am having a problem where I am unable to update a feature using applyEdits().  I can add and delete features (graphics), but when I try to just update a feature nothing happens.

Add Works:
featlayer.applyEdits([graphic], null, null);

Delete Works:
featlayer.applyEdits(null, null, [graphic]);

Update Doesn't Work:
featlayer.applyEdits(null, [graphic], null);

Has anyone else had this problem or know how to solve it?  Am I doing something wrong?

Thanks,

Doug
0 Kudos
2 Replies
RyanTwilley
Deactivated User
Looks right to me, that's how I'm using it at least.

Not sure about all of the particulars in your case, but when I had a similar problem I was including values for some fields that I had specified as read only in my msd. If you try to update these fields (by setting attributes in the graphic), I believe your update will always fail.
0 Kudos
DouglasBraeckel
Deactivated User
Thanks Ryan.

I have been able to get all three to work on one of our servers, but not on another.  That other uses a MapProxy.jsp page.  Apparently, ApplyEdits() works via the POST method, but the proxy page from ESRI is only configured for GET methods. 

I'm not sure what needs to be modified to get this to work, as I'm not really sure what the proxy page is really for.

Doug
0 Kudos