TCA Create Org Contact API

Create Org Contact API

Name of the API : CREATE ORG CONTACT
Base Tables Affected : HZ_ORG_CONTACTS and HZ_RELATIONSHIPS
PL/SQL Procedure used : CREATE_ORG_CONTACT
Package Used : HZ_PARTY_CONTACT_V2PUB

Mandatory Parameters :

Parameter Name Parameter Type Data Type
p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE
p_org_contact_rec IN ORG_CONTACT_REC_TYPE
x_org_contact_id OUT NUMBER
x_party_rel_id OUT NUMBER
x_party_id OUT NUMBER
x_party_number OUT VARCHAR2
x_return_status OUT VARCHAR2
x_msg_count OUT NUMBER
x_msg_data OUT VARCHAR2

Procedure:

 General Tips for Running the Create Organization Contact API:

a) Save the API in a script file and then run the script from the SQL Prompt (Example : RUN contactphone.sql)
b) To get the value for Department Parameter run the query:
SELECT DISTINCT department FROM hz_org_contacts;

To get the value for Job Title Parameter run the query :
SELECT DISTINCT job_title FROM hz_org_contacts;

To get the Decision Make Flag Parameter run the query :
SELECT DISTINCT decision_maker_flag FROM hz_org_contacts;

To get the Job Title Code Type Parameter run the query :
SELECT DISTINCT job_title_code FROM hz_org_contacts;

To get the Subject Id Parameter run the query:
SELECT subject_id FROM hz_relationships;

To get the Subject Type Parameter run the query:
SELECT DISTINCT subject_type FROM hz_relationships;

To get the Object Id Parameter run the query:
SELECT DISTINCT object_id FROM hz_relationships;

To get the Object Type Parameter run the query:
SELECT DISTINCT object_type FROM hz_relationships;

To get the Relationship Code Parameter run the query:
SELECT DISTINCT relationship_code FROM hz_relationships;

To get the Relationship Type Parameter run the query :
SELECT DISTINCT relationship_type FROM hz_relationships;
c) Set the organization id before running the script as :
EXEC fnd_client_info.set_org_context(‘<orgid>’); for 11i
OR For R12
EXEC mo_global.init (‘AR’);
EXEC mo_global.set_org_context(<org_id>, NULL, ‘AR’);
EXEC fnd_global.set_nls_context(‘AMERICAN’);
EXEC mo_global.set_policy_context(‘S’, <org_id>);

Example For Running a Create Org Contact API:

 Script To Verify whether the Org Contact Point API is successful:

 

Related posts:

Leave a Reply