Hello, I need a little direction.
I read in the documentation about the parameters for openDialog(dialog, data, opts) with data
being an “optional record that is used to populate form-connected widgets in the dialog.” How to define that record and pass it to the widget is where I get lost.
I have a Company data model and a Notes data model. Each note is associated with a company. In my CompanyForm dialog view, I want to create a button for a new note associated with that company, so essentially I need to populate the company Select widget on the NotesForm dialog when calling openDialog() with the button.
Took a shot in the dark with the following:
var opts = {};
var data = context.getForm('CompanyForm');
var record = data.createRecord();
context.openDialog('NotesForm', record, opts);
Thanks in advance
-ND