Insert multiple Parent CDT and their multiple child CDT

Hi,

I  would like to create an interface where it will add/insert multiple CDT (a Parent one) and it's child CDT ( one to many ). I am not using nested CDT.

Once the user enter the details, in the process model, it will insert to respective DSE. I am finding difficulty to identify the primary key of each parent and update to its respective child CDT. How can I achieve this?

Use Case: An interface where the user can multiple invoices and multiple line items for each invoice without using nested CDT.

Regards,

Surjit

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer

    Hi Surjit, you can configure your write to dse nodes in such a way where you will be getting primary key for the child tables. Let's say if you have parent table "A" and a child table "B" then first write data into table "A" and then get it's primary key after writing and then add a script task to update newly generated pk into Cdt "B" and then write your table "B" data into db. you can get primary key from stored values in output tab of write to dse node.

  • Thanks Gopal,

    As both CDTs are multiple and there is no nested CDT, how can I find which primary key is for which child CDT. If it is one to one then I can set the primary key. Something I am looking to do in the interface which will hold one Parent CDT with all its child element.