I have two entities 1. is user details and another one is activity details. I have taken one data view with an entity path of user details .inside the user detail form i want to add one functionality i.e. related to activity . In this when the user will click on add activity he will be able to add activity. he can add numbers of activity in single form and as soon as he is adding the data t, the heading of activity details will also change . how can i achieve it
One of the approaches you can do is below.
I am assuming you already have your Domain Model setup. That is, you should have your UserDetails entity related to Activity entity in a 1 to Many relationship in such a way that 1 UserDetails Entity is related to Many Activities Entity(assuming that each activity is added by a unique user and it is unique to him/her)
Create an Overview page for the UserDetails entity with a DataGrid in it with Database as DataSource.
in the New, Edit buttons of this Page, create a New Page with a DataView in it which takes the UserDetails as the context object
then add another data grid inside this dataview but this time choose the Datasource as from Association. Choose the association that you made earlier between UserDetails and Activity entities here
In this Grid add 2 buttons New and Delete which should be Microflow buttons
in New button microflow, create a new object activity and set it with the outermost UserDetails entity object and then open a new/edit page with dataview with Activity as context object
in Delete button microflow, just do a delete object activity with refresh in client
With this you can achieve your requirements i think.
Let me know how it went.
Hi Soham Rakhade,
You can go through the below part of the learning path (Nested Data )