Data event for 'save as draft'
complete
J
Jeremy Palmer
I need to be able to write validate-record or save-record (or -repeatable) code that behaves differently if a record is invalid or being saved as a draft on a mobile device.
In my case, I want to be able to unset a 'this record is finished and can be locked' field so that a draft record can't be locked by accident.
Because we don't always care about this distinction, I suggest:
(a) a function you can call in a validate event to test whether any built-in rules have invalidated the record; or
(b) an extra property on the event object for save events that can tell you whether or not the record is being saved as a draft; or
(c) a new invalidate-record or -repeatable event that is triggered just after validation rules (by any method) have decided to prevent saving.
Under 'C' attempting to save would always trigger two events: (1) validate; (2) save OR invalidate. This would have an impact on apps that use the save event now and need it to work even when saving as draft.
Katie Briggs
complete
We added an isDraft property on the event handlers.