How to create an association between 2 entities if passing one parameter in one page and other parameter in one page

Hello everyone,  We have two entities called PIAID and Record, there is many to many relation between these 2 entities.  Now in the one page we are passing PIAID as the parameter and in that page we have a button and on click of that button we need to show a page where we need to select the particular Record ID and add that Record into this particular PIAID( that means the Record ID which we have selected on click of save that should be added into that particular PIAID.   Can anyone please help me how could i achieve this by any microflow and how i need to pass the parameter in the pages.   Thanks in advance, Apururpa
3 answers

Hi Apurupa Konathala,

Actually Where do you get that record id manually entered?

This is my idea you can try this to save details from one entity to other

1.In a page pass the PAID PARAMATER and in the button call the second page where you want to select the Record id

2.In that second page use 

  •        one data view -main entity
  •        second list view -over association entity(entity1_entity2)
  •        to save call microflow in the button (in microflow commit the main entity)



To select the particular id you can use checkbox

1.Use a boolean attribute

2.In the checkbox select the boolean attribute and in events in on leave choose save changes and Auto-synchronize -yes

3.then in the save button call microflow

microflow-1.Retrieve the record entity 

                    2.Add loop

            the loop Add decision (Boolean attribute=true)

                    4.if true then commit

I am adding some screenshots to refer try it 



Hi Apurupa,


If you are using a many-to-many association, you might want to use the reference set selector. If so, you can eliminate the use of custom microflows. Did you consider using this option?


Kind regards,