View Full Version : Marking a Record Field Dirty?

19 Oct 2012, 6:37 AM
Is there a way anyone knows of to mark a record field dirty? I'm working on editing an event record and I can't just say
rec.markDirty() because there are fields in the record that our controlling DTO doesn't recognize.

If we do something like
rec.set('field', newValue); then everything is cool but only a couple of fields are actually getting new information added and I need to send other fields with the XHR request otherwise our controller blows up because it's "missing" information.

So doesn't anyone have a hack or clever way to get record fields marked as changed without actually changing their value? I tried the forums search tools but they're not very robust and I was unable to find anything useful there.

Edit: I would just change the DTO but higher pay grades think getting it working on the front end is preferable.

19 Oct 2012, 7:16 AM
So looking through the ext code I found this way to force a field to be marked as modified

record.modified[name] = record.data[name]; Just in case anyone had trouble finding that in the future.