Committing Nested Entities from Outer Action Button

0
I have a form page where the contents of a Shift_Report entity are filled in and then submitted.  However, since this form needs to include 8 employees, with each Employee having up to 6 Activities, this would make my entity have more than 48 attributes.  I’ve instead opted to make another entity named Shift_Report_Entry, where each Employee gets their own Shift_Report_Entry entity in the report.  In essence, this makes a collection of 8 data views that are all nested inside my Shift_Report entity.  This works great until I need to submit the Shift_Report, since the microflow attached to the action button will only accept the root entity (Shift_Report) as a parameter.  How can I be able to commit all the entities in this report using just one submit button? Thank you in advance!
asked
1 answers
1

Create a microflow that accepts Shift_Report entity as a parameter.  In the microflow, retrieve the list of Shift_Report_Entry via association with the Shift_Report entity (retrieving via association ensures you get any uncommitted changes to those objects).  Commit Shift_Report and the list of Shift_Report_Entry objects.  Call this microflow instead of the standard Save button.

Alternatively, if your Shift_Report_Entry objects are in a List View, you can Save Changes on each field as they are changed.  Open the properties of the widget used (text box, reference selector, etc.) and select Save Changes as the on change action.

answered