I want to implement the function of adding user record with microflow in batches

0
1 there is an add button on the page, click the add button to add a user record into user list (not in database). 2 there is a delete button behind each user information record, click the button to delete this user record from user list. 3 there is a next button in the bottom of the page, click the button, the screen jumps to the user information confirmation screen. 4 when the add button, delete button, and next button are clicked, no transaction processing occurs. 5 all data is added to the database only when the batch add button is clicked on the confirmation screen. please tell me how the above functionality can be achieved with microflow. thanks!
asked
1 answers
0

Create a batch entity and a userrecord entity, both as non-persistent entities and make sure the batch entity is associated with the list of user records.

With an add button create in a microflow a record in the userrecord entity, show a page for the new record to fill in the data.

In the page of the batch make sure you have a nested datagrid with the userrecords that you show over association (in the datasource), make sure to have a delete button to remove a selected record.

In the footer place a next button, this opens a new page with a dataview of the batch record, but the content will be a text widget with the confirmation text and you’ll pass the batch record that you are currently looking at. On this page add a create batch button connected to a microflow. This microflow has an input of the batch record object. Then perform a retrieve over association to get the userrecords associated with the batch record. Create a list of user records (empty for now). Add a loop activity that loops over the list you just retrieved. Create new user records in the user table for every iterator, add a change list action to add the new record in the list created before the loop. After the loop add a commit activity to commit the records in the list that you populated in the loop.

Make sure to close the first page on the next button and the create button. Also add the option to cancel the create on the confirmation page.

I assume that you know how to create the user record, so I did not go into details there.

 

answered