This chapter describes Party Contact APIs. The provided information includes: PL/SQL record structure and procedure, Java inner class and method, and parameter descriptions and validations.
This chapter covers the following topics:
PL/SQL Package Name: HZ_PARTY_CONTACT_V2PUB
Java Class Name: HzPartyContactV2Pub
TYPE org_contact_rec_type IS RECORD( org_contact_id NUMBER, comments VARCHAR2(240), contact_number VARCHAR2(30), department_code VARCHAR2(30), department VARCHAR2(60), title VARCHAR2(30), job_title VARCHAR2(100), decision_maker_flag VARCHAR2(1), job_title_code VARCHAR2(30), reference_use_flag VARCHAR2(1), rank VARCHAR2(30), party_site_id NUMBER, orig_system_reference VARCHAR2(240), orig_system VARCHAR2(30), attribute_category VARCHAR2(30), attribute1 VARCHAR2(150), attribute2 VARCHAR2(150), attribute3 VARCHAR2(150), attribute4 VARCHAR2(150), attribute5 VARCHAR2(150), attribute6 VARCHAR2(150), attribute7 VARCHAR2(150), attribute8 VARCHAR2(150), attribute9 VARCHAR2(150), attribute10 VARCHAR2(150), attribute11 VARCHAR2(150), attribute12 VARCHAR2(150), attribute13 VARCHAR2(150), attribute14 VARCHAR2(150), attribute15 VARCHAR2(150), attribute16 VARCHAR2(150), attribute17 VARCHAR2(150), attribute18 VARCHAR2(150), attribute19 VARCHAR2(150), attribute20 VARCHAR2(150), attribute21 VARCHAR2(150), attribute22 VARCHAR2(150), attribute23 VARCHAR2(150), attribute24 VARCHAR2(150), created_by_module VARCHAR2(150), application_id NUMBER, party_rel_rec HZ_RELATIONSHIP_V2PUB.relationship_rec_type:=HZ_RELATIONSHIP_V2PUB.G_MISS_REL_REC )
TYPE org_contact_role_rec_type IS RECORD( org_contact_role_id NUMBER, role_type VARCHAR2(30), primary_flag VARCHAR2(1), org_contact_id NUMBER, orig_system_reference VARCHAR2(240), orig_system VARCHAR2(30), role_level VARCHAR2(30), primary_contact_per_role_type VARCHAR2(1), status VARCHAR2(1), created_by_module VARCHAR2(150), application_id NUMBER )
public static class OrgContactRec { public BigDecimal org_ contact_id; public String comments; public String contact_number; public String department_code; public String department; public String title; public String job_title; public String decision_maker_flag; public String job_title_code; public String reference_use_flag; public String rank; public BigDecimal party_site_id; public String orig_system_reference; public String orig_system; public String attribute_category; public String attribute1; public String attribute2; public String attribute3; public String attribute4; public String attribute5; public String attribute6; public String attribute7; public String attribute8; public String attribute9; public String attribute10; public String attribute11; public String attribute12; public String attribute13; public String attribute14; public String attribute15; public String attribute16; public String attribute17; public String attribute18; public String attribute19; public String attribute20; public String attribute21; public String attribute22; public String attribute23; public String attribute24; public String created_by_module; public BigDecimal application_id; party_rel_rec; public HzRelationshipV2Pub.RelationshipRec public OrgContactRec(); public OrgContactRec(boolean __RosettaUseGMISSValues); }
public static class OrgContactRoleRec { public BigDecimal org_contact_role_id; public String role_type; public String primary_flag; public BigDecimal org_contact_id; public String orig_system_reference; public String orig_system; public String role_level; public String primary_contact_per_role_type; public String status; public String created_by_module; public BigDecimal application_id; public OrgContactRoleRec(); public OrgContactRoleRec(boolean __RosettaUseGMISSValues); }
This routine is used to create a Contact person for an organization or person. The API creates a record in the HZ_ORG_CONTACTS table. It additionally creates a relationship record in the HZ_RELATIONSHIPS table using the contact person as the subject, the organization or person as object and relationship type and code passed by the caller. A reverse relationship record is also created at the same time. There is a denormalized party record of type PARTY_RELATIONSHIP created for the relationship depending on relationship type set up for the relationship that is being used for the org contact.
If orig_system is passed in, the API also creates a record in the HZ_ORIG_SYS_REFERENCES table to store the mapping between the source system reference and the TCA primary key.
PROCEDURE create_org_contact ( 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 )
public static void createOrgContact( OracleConnection_connection, String p_init_msg_list, OrgContactRec p_org_contact_rec, BigDecimal [ ] x_org_contact_id, BigDecimal [ ] x_party_rel_id, BigDecimal [ ] x_party_id, String [ ] x_party_number, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following tables list information about the parameters in the Create Org Contact API. The tables include the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
org_contact_id | IN | NUMBER | No | Validation: Unique if passed in, else generated from sequence. |
comments | IN | VARCHAR2 | No | |
contact_number | IN | VARCHAR2 | Yes/No | Comment: If HZ_GENERATE_CONTACT_NUMBER= Y or null and caller does not pass any value, then generated from sequence, otherwise caller is passed value is accepted. |
department_code | IN | VARCHAR2 | No | Validation: Validated against AR lookup type DEPARTMENT_TYPE. |
department | IN | VARCHAR2 | No | |
title | IN | VARCHAR2 | No | Comment: This parameter is no longer used. Use hz_parties.person_pre_name_adjunct instead. |
job_title | IN | VARCHAR2 | No | |
decision_maker_flag | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
job_title_code | IN | VARCHAR2 | No | Validation: Validated against AR lookup type RESPONSIBILITY |
reference_use_flag | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
rank | IN | VARCHAR2 | No | |
party_site_id | IN | NUMBER | No | Validation: Foreign key to HZ_PARTY_SITES.PARTY_SITE_ID. If a value is passed, then the party_id of the party site should be same as the object_id of the relationship to be created for this org contact. |
orig_system_reference | IN | VARCHAR2 | No | Default: org_contact_id Validation: If orig_system is passed in, then orig_system_reference is required. |
orig_system | IN | VARCHAR2 | No | Validation: Foreign key to HZ_ORIG_SYSTEMS.orig_system. |
attribute_category | IN | VARCHAR2 | No | |
attribute1 | IN | VARCHAR2 | No | |
attribute2 | IN | VARCHAR2 | No | |
attribute3 | IN | VARCHAR2 | No | |
attribute4 | IN | VARCHAR2 | No | |
attribute5 | IN | VARCHAR2 | No | |
attribute6 | IN | VARCHAR2 | No | |
attribute7 | IN | VARCHAR2 | No | |
attribute8 | IN | VARCHAR2 | No | |
attribute9 | IN | VARCHAR2 | No | |
attribute10 | IN | VARCHAR2 | No | |
attribute11 | IN | VARCHAR2 | No | |
attribute12 | IN | VARCHAR2 | No | |
attribute13 | IN | VARCHAR2 | No | |
attribute14 | IN | VARCHAR2 | No | |
attribute15 | IN | VARCHAR2 | No | |
attribute16 | IN | VARCHAR2 | No | |
attribute17 | IN | VARCHAR2 | No | |
attribute18 | IN | VARCHAR2 | No | |
attribute19 | IN | VARCHAR2 | No | |
attribute20 | IN | VARCHAR2 | No | |
attribute21 | IN | VARCHAR2 | No | |
attribute22 | IN | VARCHAR2 | No | |
attribute23 | IN | VARCHAR2 | No | |
attribute24 | IN | VARCHAR2 | No | |
created_by_module | IN | VARCHAR2 | Yes | Validation: Mandatory attribute. Validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Comment: Text to indicate application from which creation of record is initiated. |
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
relationship_id | IN | NUMBER | No | Validation: Unique if passed in, else generated from sequence. |
subject_id | IN | NUMBER | Yes | Validation:
Comment: Pass the party_id of the contact person here. |
subject_type | IN | VARCHAR2 | Yes | Validation:
Comment: Pass the party_type of the subject person, which is PERSON here. |
subject_table_name | IN | VARCHAR2 | Yes | Validation:
Comment: Pass HZ_PARTIES for the table name of the source of the subject. |
object_id | IN | NUMBER | Yes | Validation:
Comment: Pass the party_id of the organization or person for which you are creating the contact. |
object_type | IN | VARCHAR2 | Yes | Validation:
Comment: Pass ORGANIZATION or PERSON depending on whether you are creating contact for an organization or for a person. |
object_table_name | IN | VARCHAR2 | No | Validation:
Comment: Pass HZ_PARTIES as the table name that is the source of the object. |
relationship_code | IN | VARCHAR2 | No | Validation:
|
relationship_type | IN | VARCHAR2 | No | Validation:
|
comments | IN | VARCHAR2 | No | |
start_date | IN | DATE | No | Validation: Mandatory attribute |
end_date | IN | DATE | No | Validation: Must not be less than start_date Default: 31-DEC-4712 |
status | IN | VARCHAR2 | No | Validation: Validated against AR lookup type REGISTRY_STATUS Default: A |
content_source_type | IN | VARCHAR2 | No | Comment: This parameter is no longer used. Use actual_content_source. Validation: Foreign key to HZ_ORIG_SYSTEMS.orig_system with sst_flag value of Y. Default: USER_ENTERED |
attribute_category | IN | VARCHAR2 | No | |
attribute1 | IN | VARCHAR2 | No | |
attribute2 | IN | VARCHAR2 | No | |
attribute3 | IN | VARCHAR2 | No | |
attribute4 | IN | VARCHAR2 | No | |
attribute5 | IN | VARCHAR2 | No | |
attribute6 | IN | VARCHAR2 | No | |
attribute7 | IN | VARCHAR2 | No | |
attribute8 | IN | VARCHAR2 | No | |
attribute9 | IN | VARCHAR2 | No | |
attribute10 | IN | VARCHAR2 | No | |
attribute11 | IN | VARCHAR2 | No | |
attribute12 | IN | VARCHAR2 | No | |
attribute13 | IN | VARCHAR2 | No | |
attribute14 | IN | VARCHAR2 | No | |
attribute15 | IN | VARCHAR2 | No | |
attribute16 | IN | VARCHAR2 | No | |
attribute17 | IN | VARCHAR2 | No | |
attribute18 | IN | VARCHAR2 | No | |
attribute19 | IN | VARCHAR2 | No | |
attribute20 | IN | VARCHAR2 | No | |
created_by_module | IN | VARCHAR2 | Yes | Validation: Mandatory attribute. Validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Comment: Text to indicate application from which creation of record is initiated. |
party_rec Record Type Attributes | ||||
party_id | IN | NUMBER | Yes | Validation: Unique if passed in, otherwise generated from sequence |
party_number | IN | VARCHAR2 | Yes/No | Validation: Generated by sequence if profile HZ_GENERATE_PARTY_NUMBER is Y, else mandatory |
validated_flag | IN | VARCHAR2 | No | Default: N |
status | IN | VARCHAR2 | No | Validation: Validated against AR lookup type REGISTRY_STATUS Default: A |
category_code | IN | VARCHAR2 | No | Validation: Validated against lookup type CUSTOMER_CATEGORY |
salutation | IN | VARCHAR2 | No | |
attribute_category | IN | VARCHAR2 | No | |
attribute1 | IN | VARCHAR2 | No | |
attribute2 | IN | VARCHAR2 | No | |
attribute3 | IN | VARCHAR2 | No | |
attribute4 | IN | VARCHAR2 | No | |
attribute5 | IN | VARCHAR2 | No | |
attribute6 | IN | VARCHAR2 | No | |
attribute7 | IN | VARCHAR2 | No | |
attribute8 | IN | VARCHAR2 | No | |
attribute9 | IN | VARCHAR2 | No | |
attribute10 | IN | VARCHAR2 | No | |
attribute11 | IN | VARCHAR2 | No | |
attribute12 | IN | VARCHAR2 | No | |
attribute13 | IN | VARCHAR2 | No | |
attribute14 | IN | VARCHAR2 | No | |
attribute15 | IN | VARCHAR2 | No | |
attribute16 | IN | VARCHAR2 | No | |
attribute17 | IN | VARCHAR2 | No | |
attribute18 | IN | VARCHAR2 | No | |
attribute19 | IN | VARCHAR2 | No | |
attribute20 | IN | VARCHAR2 | No | |
attribute21 | IN | VARCHAR2 | No | |
attribute22 | IN | VARCHAR2 | No | |
attribute23 | IN | VARCHAR2 | No | |
attribute24 | IN | VARCHAR2 | No | |
x_org_contact_id | OUT | NUMBER | No | Comment: org_contact_id of the org contact record created |
x_party_rel_id | OUT | NUMBER | No | Comment: relationship_id of the relationship record created |
x_party_id | OUT | NUMBER | No | Comment: party_id of the party record created |
x_party_number | OUT | VARCHAR2 | No | Comment: party_number of the party record created |
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
party_id | IN | NUMBER | Yes | Validation: Unique if passed in, otherwise generated from sequence |
party_number | IN | VARCHAR2 | Yes/No | Validation: Generated by sequence if profile HZ_GENERATE_PARTY_NUMBER is Y, else mandatory |
validated_flag | IN | VARCHAR2 | No | Default: N |
status | IN | VARCHAR2 | No | Validation: Validated against AR lookup type REGISTRY_STATUS Default: A |
category_code | IN | VARCHAR2 | No | Validation: Validated against lookup type CUSTOMER_CATEGORY |
salutation | IN | VARCHAR2 | No | |
attribute_category | IN | VARCHAR2 | No | |
attribute1 | IN | VARCHAR2 | No | |
attribute2 | IN | VARCHAR2 | No | |
attribute3 | IN | VARCHAR2 | No | |
attribute4 | IN | VARCHAR2 | No | |
attribute5 | IN | VARCHAR2 | No | |
attribute6 | IN | VARCHAR2 | No | |
attribute7 | IN | VARCHAR2 | No | |
attribute8 | IN | VARCHAR2 | No | |
attribute9 | IN | VARCHAR2 | No | |
attribute10 | IN | VARCHAR2 | No | |
attribute11 | IN | VARCHAR2 | No | |
attribute12 | IN | VARCHAR2 | No | |
attribute13 | IN | VARCHAR2 | No | |
attribute14 | IN | VARCHAR2 | No | |
attribute15 | IN | VARCHAR2 | No | |
attribute16 | IN | VARCHAR2 | No | |
attribute17 | IN | VARCHAR2 | No | |
attribute18 | IN | VARCHAR2 | No | |
attribute19 | IN | VARCHAR2 | No | |
attribute20 | IN | VARCHAR2 | No | |
attribute21 | IN | VARCHAR2 | No | |
attribute22 | IN | VARCHAR2 | No | |
attribute23 | IN | VARCHAR2 | No | |
attribute24 | IN | VARCHAR2 | No | |
x_org_contact_id | OUT | NUMBER | No | Comment: org_contact_id of the org contact record created |
x_party_rel_id | OUT | NUMBER | No | Comment: relationship_id of the relationship record created |
x_party_id | OUT | NUMBER | No | Comment: party_id of the party record created |
x_party_number | OUT | VARCHAR2 | No | Comment: party_number of the party record created |
This routine is used to update a Contact person. The contact record in the HZ_ORG_CONTACTS table is updated by this API. Optionally you can update the relevant relationship record in the HZ_RELATIONSHIPS table and underlying party record in the HZ_PARTIES table by calling this API. For that you should pass the corresponding id and object version number.
If the primary key is not passed in, get the primary key from the HZ_ORIG_SYS_REFERENCES table based on orig_system and orig_system_reference if they are not null and unique.
PROCEDURE update_org_contact ( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_org_contact_rec IN ORG_CONTACT_REC_TYPE, p_cont_object_version_number IN OUT NUMBER, p_rel_object_version_number IN OUT NUMBER, p_party_object_version_number IN OUT NUMBER, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void updateOrgContact( OracleConnection_connection, String p_init_msg_list, OrgContactRec p_org_contact_rec, BigDecimal [ ] p_cont_object_version_number, BigDecimal [ ] p_rel_object_version_number, BigDecimal [ ] p_party_object_version_number, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following tables list information about the parameters in the Update Org Contact API. The tables include the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
org_contact_id | IN | NUMBER | Yes | Validation: Valid org_contact_id should be passed in. Comment: Pass the org_contact_id from hz_org_contacts table for this org contact. |
comments | IN | VARCHAR2 | No | |
contact_number | IN | VARCHAR2 | No | |
department_code | IN | VARCHAR2 | No | Validation: Validated against AR lookup type DEPARTMENT_TYPE |
department | IN | VARCHAR2 | No | |
title | IN | VARCHAR2 | No | Comment: This parameter is no longer used. Use hz_parties.person_pre_name_adjunct instead. |
job_title | IN | VARCHAR2 | No | |
decision_maker_flag | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
job_title_code | IN | VARCHAR2 | No | Validation: Validated against AR lookup type RESPONSIBILITY |
reference_use_flag | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
rank | IN | VARCHAR2 | No | |
party_site_id | IN | NUMBER | No | Validation: Foreign key to HZ_PARTY_SITES.PARTY_SITE_ID. If value passed in, then the party_id of the party site should be same as the object_id of the relationship created for this org contact. |
orig_system_reference | IN | VARCHAR2 | No | Validation: Non updateable, but if a primary key is not passed in, you can pass in any ORIG_SYSTEM and ORIG_SYSTEM_REFERENCE that exists in the HZ_ORIG_SYS_REFERENCE table and unique validation is bypassed. The ORIG_SYSTEM_REFERENCE does not change, but persists in the table. |
orig_system | IN | VARCHAR2 | No | Validation: Foreign key to HZ_ORIG_SYSTEMS.orig_system. |
attribute_category | IN | VARCHAR2 | No | |
attribute1 | IN | VARCHAR2 | No | |
attribute2 | IN | VARCHAR2 | No | |
attribute3 | IN | VARCHAR2 | No | |
attribute4 | IN | VARCHAR2 | No | |
attribute5 | IN | VARCHAR2 | No | |
attribute6 | IN | VARCHAR2 | No | |
attribute7 | IN | VARCHAR2 | No | |
attribute8 | IN | VARCHAR2 | No | |
attribute9 | IN | VARCHAR2 | No | |
attribute10 | IN | VARCHAR2 | No | |
attribute11 | IN | VARCHAR2 | No | |
attribute12 | IN | VARCHAR2 | No | |
attribute13 | IN | VARCHAR2 | No | |
attribute14 | IN | VARCHAR2 | No | |
attribute15 | IN | VARCHAR2 | No | |
attribute16 | IN | VARCHAR2 | No | |
attribute17 | IN | VARCHAR2 | No | |
attribute18 | IN | VARCHAR2 | No | |
attribute19 | IN | VARCHAR2 | No | |
attribute20 | IN | VARCHAR2 | No | |
attribute21 | IN | VARCHAR2 | No | |
attribute22 | IN | VARCHAR2 | No | |
attribute23 | IN | VARCHAR2 | No | |
attribute24 | IN | VARCHAR2 | No | |
created_by_module | IN | VARCHAR2 | No | Validation: Non updateable if value exists, else validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Validation: Not updateable if a value exists. |
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
relationship_id | IN | NUMBER | Yes/No | Validation: Valid relationship_id should be passed in Comment:
|
subject_id | IN | NUMBER | No | Validation: Non updateable |
subject_type | IN | VARCHAR2 | No | Validation: Non updateable |
subject_table_name | IN | VARCHAR2 | No | Validation: Non updateable |
object_id | IN | NUMBER | No | Validation: Non updateable |
object_type | IN | VARCHAR2 | No | Validation: Non updateable |
object_table_name | IN | VARCHAR2 | No | Validation: Non updateable |
relationship_code | IN | VARCHAR2 | No | Validation: Non updateable |
relationship_type | IN | VARCHAR2 | No | Validation: Non updateable |
comments | IN | VARCHAR2 | No | |
start_date | IN | DATE | No | Validation: Cannot be updated to null |
end_date | IN | DATE | No | Validation: Cannot be less than start_date |
status | IN | VARCHAR2 | No | Validation: Validate against AR lookup type REGISTRY_STATUS Cannot be updated to null |
content_source_type | IN | VARCHAR2 | No | Comment: This parameter is no longer used. Use actual_content_source. Validation: Not updateable |
attribute_category | IN | VARCHAR2 | No | |
attribute1 | IN | VARCHAR2 | No | |
attribute2 | IN | VARCHAR2 | No | |
attribute3 | IN | VARCHAR2 | No | |
attribute4 | IN | VARCHAR2 | No | |
attribute5 | IN | VARCHAR2 | No | |
attribute6 | IN | VARCHAR2 | No | |
attribute7 | IN | VARCHAR2 | No | |
attribute8 | IN | VARCHAR2 | No | |
attribute9 | IN | VARCHAR2 | No | |
attribute10 | IN | VARCHAR2 | No | |
attribute11 | IN | VARCHAR2 | No | |
attribute12 | IN | VARCHAR2 | No | |
attribute13 | IN | VARCHAR2 | No | |
attribute14 | IN | VARCHAR2 | No | |
attribute15 | IN | VARCHAR2 | No | |
attribute16 | IN | VARCHAR2 | No | |
attribute17 | IN | VARCHAR2 | No | |
attribute18 | IN | VARCHAR2 | No | |
attribute19 | IN | VARCHAR2 | No | |
attribute20 | IN | VARCHAR2 | No | |
created_by_module | IN | VARCHAR2 | No | Validation: Non updateable if value exists, else validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Validation: Not updateable if value exists. |
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
party_id | IN | NUMBER | Yes/No | Validation: Valid party id in HZ_PARTIES. Comment:
|
party_number | IN | VARCHAR2 | No | Validation: Not updateable |
validated_flag | IN | VARCHAR2 | No | |
status | IN | VARCHAR2 | No | Validation:
|
category_code | IN | VARCHAR2 | No | Validation: Validated against lookup type CUSTOMER_CATEGORY. |
salutation | IN | VARCHAR2 | No | |
attribute_category | IN | VARCHAR2 | No | |
attribute1 | IN | VARCHAR2 | No | |
attribute2 | IN | VARCHAR2 | No | |
attribute3 | IN | VARCHAR2 | No | |
attribute4 | IN | VARCHAR2 | No | |
attribute5 | IN | VARCHAR2 | No | |
attribute6 | IN | VARCHAR2 | No | |
attribute7 | IN | VARCHAR2 | No | |
attribute8 | IN | VARCHAR2 | No | |
attribute9 | IN | VARCHAR2 | No | |
attribute10 | IN | VARCHAR2 | No | |
attribute11 | IN | VARCHAR2 | No | |
attribute12 | IN | VARCHAR2 | No | |
attribute13 | IN | VARCHAR2 | No | |
attribute14 | IN | VARCHAR2 | No | |
attribute15 | IN | VARCHAR2 | No | |
attribute16 | IN | VARCHAR2 | No | |
attribute17 | IN | VARCHAR2 | No | |
attribute18 | IN | VARCHAR2 | No | |
attribute19 | IN | VARCHAR2 | No | |
attribute20 | IN | VARCHAR2 | No | |
attribute21 | IN | VARCHAR2 | No | |
attribute22 | IN | VARCHAR2 | No | |
attribute23 | IN | VARCHAR2 | No | |
attribute24 | IN | VARCHAR2 | No | |
p_cont_object_version_number | IN OUT |
NUMBER | Yes | Validation:
Comment:
|
p_rel_object_version_number | IN OUT |
NUMBER | Yes/No | Validation:
Comment:
|
p_party_object_version_number | IN OUT |
NUMBER | Yes/No | Validation:
Comment:
|
This routine is used to create a Contact Role for a contact person. The API creates a record in the HZ_ORG_CONTACT_ROLES table. You can create multiple role records for a particular org contact. For a particular org contact, one of the org contact role records can be marked as Primary and there can be one role record per role type. For a particular organization or person, among all its org contacts, you can mark one role record per role type as primary.
If orig_system is passed in, the API also creates a record in the HZ_ORIG_SYS_REFERENCES table to store the mapping between the source system reference and the TCA primary key.
PROCEDURE create_org_contact_role ( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_org_contact_role_rec IN ORG_CONTACT_ROLE_REC_TYPE, x_org_contact_role_id OUT NUMBER, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void createOrgContactRole( OracleConnection_connection, String p_init_msg_list, OrgContactRoleRec p_org_contact_role_rec, BigDecimal [ ] x_org_contact_role_id, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Create Org Contact Role API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
org_contact_role_id | IN | NUMBER | No | Validation: Unique when passed in, else generated from sequence |
role_type | IN | VARCHAR2 | Yes | Validation:
|
primary_flag | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
org_contact_id | IN | NUMBER | Yes | Validation: Mandatory attribute Foreign key to HZ_ORG_CONTACTS.ORG_CONTACT_ID |
orig_system_reference | IN | VARCHAR2 | No | Default: org_contact_role_id Validation: If orig_system is passed in, then orig_system_reference is required. |
orig_system | IN | VARCHAR2 | No | Validation: Foreign key to HZ_ORIG_SYSTEMS.orig_system. |
role_level | IN | VARCHAR2 | No | |
primary_contact_per_role_type | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
status | IN | VARCHAR2 | No | Validation: Validated against AR lookup type REGISTRY_STATUS Default: A |
created_by_module | IN | VARCHAR2 | Yes | Validation: Mandatory attribute. Validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Comment: Text to indicate application from which creation of record is initiated |
x_org_contact_role_id | OUT | NUMBER | No | Comment: Return org_contact_role_id for record created |
Primary Flag can be set to ‘Y' only for one org contact role record for each org contact.
The combination of org_contact_id and role_type must be unique.
Only one org contact can be set as primary within the same organization party.
This routine is used to update a contact role record. The API updates the record in the HZ_ORG_CONTACT_ROLES table.
If the primary key is not passed in, get the primary key from the HZ_ORIG_SYS_REFERENCES table based on orig_system and orig_system_reference if they are not null and unique.
PROCEDURE update_org_contact_role ( p_init_msg_list IN VARCHAR2:= FND_API.G_FALSE, p_org_contact_role_rec IN ORG_CONTACT_ROLE_REC_TYPE, p_object_version_number IN OUT NUMBER, x_return_status OUT VARCHAR2, x_msg_count OUT NUMBER, x_msg_data OUT VARCHAR2 )
public static void updateOrgContactRole( OracleConnection_connection, String p_init_msg_list, OrgContactRoleRec p_org_contact_role_rec, BigDecimal [ ] p_object_version_number, String [ ] x_return_status, BigDecimal [ ] x_msg_count, String [ ] x_msg_data ) throws SQLException;
The following table lists information about the parameters in the Update Org Contact Role API. The table includes the parameter names, the type of each parameter, the data type of each parameter, the necessity of the parameter, and other information about the parameter such as validation, defaults, and other comments.
Parameter Name | Type | Data Type | Required | Validation, Default, Comment |
---|---|---|---|---|
org_contact_role_id | IN | NUMBER | Yes | Validation: Valid org_contact_role_id should be passed in Comment: Pass the org_contact_role_id from hz_org_contact_roles table |
role_type | IN | VARCHAR2 | No | Validation:
|
primary_flag | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
org_contact_id | IN | NUMBER | No | Validation: Not updateable |
orig_system_reference | IN | VARCHAR2 | No | Validation: Non updateable, but if a primary key is not passed in, you can pass in any ORIG_SYSTEM and ORIG_SYSTEM_REFERENCE that exists in the HZ_ORIG_SYS_REFERENCE table and unique validation is bypassed. The ORIG_SYSTEM_REFERENCE does not change, but persists in the table. |
orig_system | IN | VARCHAR2 | No | Validation: Foreign key to HZ_ORIG_SYSTEMS.orig_system. |
role_level | IN | VARCHAR2 | No | |
primary_contact_per_role_type | IN | VARCHAR2 | No | Validation: Validated against AR lookup type YES/NO |
status | IN | VARCHAR2 | No | Validation:
|
created_by_module | IN | VARCHAR2 | No | Validation: Non updateable if value exists, else validated against AR lookup type HZ_CREATED_BY_MODULE. |
application_id | IN | NUMBER | No | Validation: Not updateable if value exists. |
p_object_version_number | IN OUT |
NUMBER | Yes | Validation:
Comment:
|
Primary Flag can be set to ‘Y' only for one org contact role record for each org contact.
The combination of org_contact_id and role_type must be unique.
Only one org contact can be set as primary within the same organization party.