How to set the value to a Relationship type field in the child table with Create Entity Record activity

This is about adding a record to the child table. I am trying to add data from UiPath (not interactively from the browser). I have Invoices table with InvoiceNo and InvoiceLines table with “Parent Invoice No” as a relationship field tied to the InvoiceNo field in the Invoices table.

I am trying to add a record into the InvoiceLines table using Create Entity Record activity. How do I set the value for the Relationship field? I added an invoice in the parent table with value “12345” When I add a child record in the Invoice Lines table for that Invoice “12345”, the “Parent Invoice No” field must also be set to “12345”, right? I have tried InvoiceLineRecord.ParentInvoiceNo, InvoiceLineRecord.ParentInvoiceNo.InvoiceNo and none of them work. Any ideas?


1 Like

Hey @savantsa

Please find the demo below,

You need to pass the object type of the parent data service for the relation field of child (2.7 KB)

Hope this helps.


1 Like

Makes sense from the error message I’ve been getting. Let me try that and if it works, I’ll let you know.

1 Like

Nithin has provided the right answer.

You can also use the example of Olympics & Medals from our documentation to understand how related records are created - Using entities in projects

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.