Hello Folks,
I am building a request body passing multiple records to be created in single request. All are related records. I have three levels in the relation, i.e., Record 1, Record 2 & Record 3.
Record 1 is the parent to Record 2.
Record 1 and Record 2 are parents to Record 3.
I can successfully create records Record 1,2 & 3.
Records 1 & 2 are linked correctly. Whereas, Record 3 is only linked to Record 2, and its missing relation to Record 1. Can someone help me with this.
Below is my request body for your reference. Contact and Opportunity are linked correctly. Whereas Task is linked to Opportunity alone, but i want it to be linked to Contact as well.
{
"records": [{
"attributes" : {"type": "Contact", "referenceId" : "con1"},
"LastName" : "Jackson",
"FirstName" : "Emily",
"Opportunities" : {
"records" : [{
"attributes" : {"type" : "Opportunity", "referenceId" : "opp1"},
"Name" : "Training",
"tasks" : {
"records" : [{
"attributes" : {"type" : "Task", "referenceId" : "task1"},
"Priority" : "Normal",
"Subject" : "Emily Jackson - Training"
}]
}
}]
}
}]
}