For one parent record want to add multiple child records on same save action

For one Parent record i want to add multiple child records on same save action, and this whole process can be done multiple no. of time. like i have two entities 

1. Student {id, name}

2. Course {id, student.id, course}

first i fill student name then on clicking add course button i fill multiple courses after that On Clicking ADD i fill Another student name and so on..... and all this data will save on same save action.

How i achieve this. 

Hi Poonam ,

First save the student data using default entity action CreateOrUpdateStudent and than iterate over the course list use the id return by the CreateOrUpdateStudent and assign it to each course record and save the course record using CreateOrUpdateCourse action.



Regards,

-PJ-

Hi Pramod,

Thx for your reply,

But i have multiple parent record also like 

1. Student1  with course1, course 2,......

2. Student2 with course1, ......

3. Student3 .....


In this how i can find for Student1 these are the courses .... because all the courses are appending in same list.

Hi Poonam,

Create a web block with input parameter StudentId and then use list in this block for only one student. 

And add this web block into the list element of student's list.

Hi Poonam ,

I thought it differently like one student and multiple courses and thus suggested the other option. You can follow Daryna's suggestion to achieve what you are looking for.


Regards,

-PJ-

Daryna Kravets wrote:

Hi Poonam,

Create a web block with input parameter StudentId and then use list in this block for only one student. 

And add this web block into the list element of student's list.

Hi Daryna,

Can you plz send me any reference or oml.

Actually i am wondering that how i assign web block to list.


Solution

Poonam Verma wrote:

Daryna Kravets wrote:

Hi Poonam,

Create a web block with input parameter StudentId and then use list in this block for only one student. 

And add this web block into the list element of student's list.

Hi Daryna,

Can you plz send me any reference or oml.

Actually i am wondering that how i assign web block to list.



Look at the attached oml. 

Solution