HZ_RELATIONSHIPS SUBJECT_ID and OBJECT_ID explanation

 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

All Categories

Call Fusion BIP Report2 Change Password1 Code Combinations2 Compute Instance2 CTE1 Customer1 Data Aggregation2 Database5 Date Conversion1 DB Adapter2 Decryption1 Development1 EBS4 Encryption1 ESS Jobs3 Examine1 FBDI3 Fusion APIs1 Fusion BIP7 GIT2 GL3 GL Journals1 GL_DAILY_CONVERSION_TYPES1 GL_DAILY_RATES1 ICS1 Identity Domain1 Integrations1 Java1 Journal Import1 Keys1 Legal Entity1 LookupTypeLOV1 LOV1 LOVs1 MultiPartAPIs1 Networking1 NVL2 NVL in OIC2 OCI11 OCI Billing1 OCI Compute5 OCI Cost Management1 OCI Events Service1 OCI Free Tier3 OCI Notifification Service1 OCI Security3 OIC4 OIC Mapper2 Oracle26 Oracle ADF17 Oracle APEX1 Oracle Apps59 Oracle Apps R126 Oracle ATP1 Oracle BIP8 Oracle Cloud12 Oracle Cloud Free Tier1 Oracle cloud Infrastructure9 Oracle Cloud Security2 Oracle Cloud VM1 Oracle DB4 oracle ebs5 Oracle ERP4 Oracle ERP Adapter2 Oracle ERP Cloud7 Oracle financials2 Oracle Forms1 Oracle Fusion57 Oracle Fusion BIP4 Oracle Fusion ERP17 Oracle Fusion Financials18 Oracle Integration Cloud3 Oracle OAF17 Oracle OCI14 Oracle OIC22 Oracle SOA 12c10 Oracle SQL17 Oracle VBCS1 Oracle VBS2 Oracle Visual Builder Cloud Service1 Oracle Visual Builder Studio2 Oracle Workflow Notifications1 Others10 Payables2 Payables Import1 Properties1 R121 Register BIP as ESS Job1 Reset Password1 Responsibility1 REST4 Security List1 Site Map1 SOAP2 SOAP API2 SOAP UI3 SQL16 SQL Functions3 SQL Queries14 SQL Query8 SQL Tips3 SSH1 TCA1 Value Sets1 VBCS1 Virtual Machine2 Virtual Machines1 XML1 XSLT1
Show more