Creating a child record when record is inserted from parent table based on value selected from parent table

Pat Surtan
Tera Expert

Hello,

I have a requirement to create a child record in child table when a record is inserted into parent table based on the value selected from parent table. As of right now I have 1 parent table and 2 child tables.

For example, if you select a value from a dropdown, say value 1, a ticket in child table 1 is created. If you select dropdown value 2, a ticket in child table 2 is created, etc.?

Also, how do I update a field from one either the parent or child and have the same field updated in the parent/child record?

 

Thanks in advance.

3 REPLIES 3

Yousaf
Giga Sage

Hi Pat,

Please refer to this.

You will need to modify the script a little add If condition,

Auto create child record when record inserted on parent table - Related list (BR)

 

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

Hello Yousaf,

 

I am not much of a developer? Do you have a working script to share? Would a flow be easier than a script?

Providing an update to my question.

 

So I went with a flow method since I didn't' want to script anything. I created a simple flow; looks like the ticket was created in the child table. In my flow, when I create a new parent record, the ticket shows 00001. I was expecting the child table to show the same ticket number - 00001. However, the child ticket number is 00002.

 

This probably happening because the record is creating twice in the same parent table I think? Can anyone help?