+ Reply to Thread
Results 1 to 2 of 2

Thread: applyEdits works for new/delete, but not update?

  1. #1
    Dan Deneau
    Join Date
    Dec 2010
    Posts
    14
    Points
    0
    Answers Provided
    1


    0

    Default applyEdits works for new/delete, but not update?

    Hi All,

    I'm working on a custom application that doesn't use the AttributeInspector/TemplatePicker...because I had to get greater control over things. Anyway, in a simple example I had worked up, I was able to applyEdits (new, updates, and deletes)...so i thought everything was ok. Then, I went further, creating a slightly more complex application...and somewhere along the way...my "updates" (when calling applyEdits) fails...the feature just reverts back to whatever it was...although the onEditsComplete event is raised, I'm not able to get the FeatureEditResult object back for updates...the event simply returns "null". I am STILL able to create and save new features, as well as select and delete features.

    Anyone have any ideas why applying update edits would fail? It works in a simpler page I have (although i'm using the attribute inspector there). It's not a data permissions issue because that simple page can appy all 3 types of edits. Why would the FeatureEditResult for updates return NULL???

    thanks, I'm stuck!
    Dan

  2. #2
    Dan Deneau
    Join Date
    Dec 2010
    Posts
    14
    Points
    0
    Answers Provided
    1


    0
    This post is marked as the answer

    Default Re: applyEdits works for new/delete, but not update?

    Yeah, so, I was a dum dum last night

    The issue was that when I used the setAttributes method to update the attributes of my feature (based on what was in my own attributes window), ...it was clearing the objectID, because I don't have a visible control showing the user the objectID...when I went through the loop of my attributes...it only set the values I specify...effectively clearing out existing attributes...maybe there should be an 'updateAttributes' method...but that's nit-picky i guess.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts