UI field in editor inside a tab is not changing after updateRow in model through javascript

I have a javascript event handler like so that listens to an event that is raised elsewhere in the application, but that updates the Client model zip_code__c field with what is passed in the eventDetails.

image

The code above is working correctly in that it it gets triggered and updates the model when the event occurs, however, the field in the UI is still displaying the old data.

Note that the field is in an Editor inside of Tab.  Not sure if that would matter.
I was under the impression that the editor would detect the change in the model and display the change automatically.  Why would this not be occurring.

Thanks in advance.

Comments

  • Amy DewaalAmy Dewaal ✭✭
    edited May 2018
    Software Developer Guy,

    The changes aren't getting reflected because you still need to save the model after you update the rows. Right after "model.updateRow( row1, fielsToUpdate);" add "model.save();" Check out the comment on this community post to see how you can also add a callback function to the save method to confirm that your model saved without error.

    Thanks!
    Amy
  • Matt SonesMatt Sones ✭✭
    edited October 2017
    If you don't want to save, you can also forcibly re-render the field editor that still shows the old data, like so:
    skuid.$C('MyFieldEditorId').render();
Sign In or Register to comment.