Model-driven app using Dataverse.
I wanted to make a screen with input fields at the top of the form and a grid of records on the bottom half of the form.
legacy Command bar button, form level, to create multiple records based on the input fields.
legacy Command bar buttons grid level to delete multiple or update multiple.
input field 1 is a Customer lookup, input field 2 is a multiple select field.
on change the Customer lookup fills the grid with the rows for that customer from a custom table.
The multiple select field allows the selection of multiple record type indicators, like if this was Color table, the multi select would have red, blue, green, yellow, orange, etc.
so, the user can select a Customer and the several indicators.
now to create multiple records based on these inputs the Create Multiple form level command button calls a javascript that processes the input into Web API calls to createRecord. the records are created, the grid is updated. all is well.
The biggest problem with this is that the "form" is being subverted for a different purpose than intended. so, when the input fields are dirty, the Save unsaved changes dialog is fired.
I cannot find any way to prevent this. I have not found a way to fire anything before that dialog pops up.
I do have a close button by which the user can exit the form without the dialog because I can reset the input fields to make the form not dirty.
but I have not found a way to make the input fields not dirty when the user navigates away or clicks the back button.
I do not clear the input fields after the Create multiple form level button is clicked... mostly because I dont want the user to have to re-select the indicators again. Typically, they are going to create the same records for multiple Customers.
I know this is really hack, but it does save my users a lot of clicks and time.
thoughts, concerns?
I sure would like to see Powerapps make it possible to do this OOB. Anyone else think this could be useful?