SmartClient Version: v12.1p_2020-05-04/Pro Deployment (built 2020-05-04)
Hello,
I'm having a hard time with what I assume has a simple answer, but I've scanned the docs and forums and haven't found a solution. We have a basic screen with a ListGrid of records, a DynamicForm for creating/editing a record, and buttons for new, edit, and save. When the new button is clicked, we are calling editNewReocrd() on the form. When save is clicked, we are calling saveData() on the form. All this is functioning as we'd expect.
What we would like to do is set the ListGrid selection to the newly created record after the save button is clicked. I've seen the selectSingleRecord() method in the documentation and assume that is what we will need to use. My question is, how can I access the newly created record object to pass into selectSingleRecord()? Is this available from the form itself or will I need to fetch it explicitly from the DataSource using the primary key after the saveData() method fires?
Any help would be greatly appreciated!
Thanks,
Jason
Hello,
I'm having a hard time with what I assume has a simple answer, but I've scanned the docs and forums and haven't found a solution. We have a basic screen with a ListGrid of records, a DynamicForm for creating/editing a record, and buttons for new, edit, and save. When the new button is clicked, we are calling editNewReocrd() on the form. When save is clicked, we are calling saveData() on the form. All this is functioning as we'd expect.
What we would like to do is set the ListGrid selection to the newly created record after the save button is clicked. I've seen the selectSingleRecord() method in the documentation and assume that is what we will need to use. My question is, how can I access the newly created record object to pass into selectSingleRecord()? Is this available from the form itself or will I need to fetch it explicitly from the DataSource using the primary key after the saveData() method fires?
Any help would be greatly appreciated!
Thanks,
Jason
Comment