How to know if a saveData is calling "add" or "update"

I’ve got a class that provides a Save button for several screens. When clicked it obviously calls form.saveData(). Now on some of the pages I want to do extra work when the form is doing an add by specifying a callback. But I’m not sure how I determine what the saveData is going to call such that I know if I should pass it the callback function or not. Any way to do this?

Hi JJohns
When you first populate the form with data I’m assuming you’re using editRecord() or editNew() depending whether this is an add or a update type operation.
You could add a property to the DynamicForm at this point to mark it as an add (if appropriate), and then check this property when saving the forms values, running your extra logic if appropriate.

Will this work for you?