https://community.oracle.com/thread/574250
Scenario: Relationship between Parties; this relationship is between parties of type โPERSONโ and โORGANIZATIONโ (John is Employee of Vision)
Before creating relationship, the above party records should exist in TCA.
Where they exist?
They exist in HZ_PARTIES table.
What is the primary key in the HZ_PARTIES to identify these records?
It is PARTY_ID
Is HZ_PARTIES part of FND_OBJECTS?
Yes
Two records are created in HZ_PARTIES for Vision and John with the PARTY_ID as โ1234โ and โ5678โ before you create relationship between them.
When you create โEMPLOYEEโ relationship between them, you have to pass the following values to the API.
OBJECT_TABLE_NAME = โHZ_PARTIES
OBJECT_ID = PARTY_ID i.e.1234
OBJECT_TYPE = โORGANIZATIONโ i.e. PARTY TYPE
SUBJECT_TABLE_NAME = โHZ_PARTIES
SUBJECT_ID = PARTY_ID i.e.5678
SUBJECT_TYPE = โPERSONโ i.e. PARTY TYPE
The purpose of these parameters is to identify the entities and the primary key between which you are creating relationship. Technically, you are creating relationship between 2 database records, which already created and are uniquely identified by a primary key in a table.
In the above example, the API validates the values โ1234โ and โ5678โ against PARTY_ID of HZ_PARTIES and makes sure that those records exist in that table. The reason being, you cannot create relationship between Vision and John if they do not exist.
The primary key = OBJECT_ID/SUBJECT_ID
Table name = OBJECT_TABLE_NAME/SUBJECT_TABLE_NAME.
Note that, the above relationship is between the 2 records existing in HZ_PARTIES table.
You can also use other entities records to create relationship if those entities are defined in FND_OBJECTS. It is normal practice that mostly relationships are created between parties ('ORGANIZATIONโ/โPERSONโ and โPERSONโ/โPERSONโ. )
To create relationship between other entities you have to do some setups.
Comments
Post a Comment