No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Why is there no setValues(Record) in dynamicform?

    Hi, as you might notice we're re-evaluating a lot of old code.

    We have a grid with a form to show values. The form is read-only until someone clicks an edit button. We're right now using "editRecord" every time the form is clicked. Looking at this now, i'm thinking that the method we're supposed to use is "setValues", since we're not editing. But, there's no setvalues that takes a Record in DynamicForm.

    I was just curious if there's any reason for this? Since we use grid.getselectedrecord, we'd have to do Record.toMap everytime we want to show a grid record in the form. The editRecord takes a record.

    editRecord() is the correct API here. In addition to setting the values, it tells the form this is a pre-existing record, which affects the saveOperationType.