Fetch Foreign Key values in Child Table

Certified Associate Developer

Hi Community Team,

Here, I'm using two Cdt's One parent table (Emoloyee Details) and one child table (Comments).

I'm calling primary key in the parent table into the child table to fetch the values in the Child table.  I'm getting NULL instead of primary key of parent Cdt. Please help me out how to configure this error?

Child PK                    Parent FK

Comments_ID     Employee_ID

 1                           NULL

 2                            NULL

 3                            NULL

 4                             NULL

 5                              NULL

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Chandrasekhar Reddy

    You have to use two seperate writeToDatastore entity smart service to write the data with foreign key concept. In the first WritetoDatastoreEntity insert the value to parent Table and save the inserted value to the same variable in the output of that node and in the second writetodatastoreentity use the parent variable primary key to store it as a foreign key. With that, you will be able to add parent table id to child table.

Children