AnsweredAssumed Answered

How would I cancel a edit

Question asked by Kenneth Brill on Aug 30, 2018

In my record.js I have


if(_.isEmpty(po)) {
          'empty-po-fail', {
                         level: 'error',
                         messages: 'You must enter a PO Number before you can continue.  The status has been reset to "' + prevStatus + '"',
                         autoClose: false
                    self.model.set('status', prevStatus);

at the end there I want it to canel the edit and return the user back to a "detailview".  I have tried everything and some thieng work if the user had clicked the EDIT button but fail when they had clicked the field level edit button (the pencil).  Is there a way to do this no matter how they entered into the edit mode?