I've just wrestled with DynamicForm.saveData(). I had presumed that saveData was smart and knew when to add and when to update a record. I presume it's supposed to work that way?
I don't have time to create a small repro case right now, but I solved my problem by calling form.getValuesAsRecord() and adding/updating the record in my datasource. When I did not do this, my second call to saveData (after making a field change the form) added a duplicate record instead of updating the record.
I don't have time to create a small repro case right now, but I solved my problem by calling form.getValuesAsRecord() and adding/updating the record in my datasource. When I did not do this, my second call to saveData (after making a field change the form) added a duplicate record instead of updating the record.
Comment