How can I save form data into two entities on save of a form.

0
I need to save the data into two entities on click of Save button in a form. How can I do that? I have tried passing two create objects of both the entities on form, and then on click of save button I am calling a microflow to save the data. but I am not getting anything on that microflow, how will I save the data to entity in this case? Can anyone please help? 
asked
2 answers
0

Hi Ankita, 

 

Did you parse the two object you used on your form in your microflow?

 

 

answered
3

Hi Ankita Agrawal

I think the best way to do that is to have a non-persist entity have all form attributes

to open the form page you need a nanoflow to create this non-persist object and pass it to the page

on the save button call a microflow:

1- First thing you have to validate the entered data

2- Create an object of the first entity and set the attributes you need

3- Create an object of the second entity and set the attributes you need 

Make sure to commit the objects

Make sure of the user role that will trigger this logic if it has a create, read, write permission of both entities if the security of your project is set to production.

Please mark this as an accepted answer if it answers your question

if not please provide us with screenshots of your domain model and logic

 

answered