function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Globe Salesforce AdminGlobe Salesforce Admin 

Creating a child record related to the parent

Hi,

 

I am trying to create what i believe to be a really simple flow, yet cannot seem to solve the problem. 

I have an object A (Parent) & Obect B (Child) relationship. I would like to use flows to create a new Child record related to the existing A record.

 

I created a custom button to run the flow and pass Object A's Record Name into the 1st Flow screen.

I then inserted a record lookup to get Object A's ID

Then I inserted a Record Create for Object B, with the Object A ID Variable & Object A Name Variable.

 

Yet, i keep getting this error:

 

UPSERT --- UPSERT FAILED ---  ERRORS :  (MALFORMED_ID) Object A: id value of incorrect type: Object A Name ---  for SFDC record with ID : null,

 

caused by element : Data update.Create Object B

 

Can anyone please tell me what i'm doing wrong? And if not, would you have some direction on how to simply create a Child record related to a parent record.

 

Thanks,

Jennifer

 

RajaramRajaram
You ned to make sure you enter all the required fields of Object B when using the record create element. For your use case, you need not use the lookup element to get the ID of object A, you can pass the ID directly into the variable. Make sure the flow variable is set to input or input/output only.
Globe Salesforce AdminGlobe Salesforce Admin

thank you