+ Start a Discussion
Mahesh Babu 187Mahesh Babu 187 

Create A New Record Through Flow/Trigger

I have three objects A, B and C . I want to create new record of obj. A having name field value from obj. B and price field value from obj. C. A and B are child object of B but C doesn't have any relation with A. 

1. If it is possible through flow.Can anyone share the steps.
2. If it is possible through trigger. Please share a sample code.

Thanks,
Mahesh
ShirishaShirisha (Salesforce Developers) 
Hi Mahesh,

Greetings!

The last point is not clear for me which is as "A and B are child object of B but C doesn't have any relation with A. "

How come B Object is child of B Object.Can you please confirm,if there is any mistype of the letter B instead of B.

Also,seems like you are trying to copy the data from the parent record and another child Object of that B.

If you don't want to use any code,then you can simply create the formula field on Object B to copy the Price value of the C record so that you can simply query the parent B's fields and create the record on A directly.

Reference:https://salesforce.stackexchange.com/questions/238696/process-builder-create-child-records-using-the-parent-record-id

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
Mahesh Babu 187Mahesh Babu 187
Oh, sorry Shirisha. It is like A and C are child object of B . C doesn't have any relation with A. 
And also it should be able to create multiple records, not just a single record.