Using REST For Create Account-contact Relationship Error

(Doc ID 2314990.1)

Last updated on OCTOBER 25, 2017

Applies to:

Oracle Fusion Sales Cloud Service - Version 11.12.1.0.0 and later
Information in this document applies to any platform.

Goal

Customer is trying to create a relationship between Account and Contacts (Add Contact to an Account with REST)

With this JSON, they are facing this error:

https://ccwu-test.crm.em2.oraclecloud.com/crmCommonApi/resources/11.12.1.0/accounts/ALCA-GQC9K/child/Relationship
Method:POST

{
  "ObjectPartyNumber":"4036",
  "RelationshipType":"CONTACT",
  "RelationshipCode":"CONTACT_OF",
  "CreatedByModule":"HZ_WS",
  "SubjectTableName":"HZ_PARTIES",
  "SubjectType":"PERSON",
  "SubjecId":"300000002163528",
  "Role": "CONTACTORG"
}

Error occurred due to invalid attribute being passed in input payload. Attribute: "SubjecId"

If we eliminate SubjectId:
{
  "ObjectPartyNumber":"4036",
  "RelationshipType":"CONTACT",
  "RelationshipCode":"CONTACT_OF",
  "CreatedByModule":"HZ_WS",
  "SubjectTableName":"HZ_PARTIES",
  "SubjectType":"PERSON",
  "Role": "CONTACTORG"
}

Attribute SubjectId in RelationshipEO is required.

How can this be solved?
 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms