15: )
16: IS
17: l_rel_rec hz_relationship_v2pub.relationship_rec_type;
18: l_rel_party_rec hz_party_v2pub.party_rec_type;
19: l_rel_party_number hz_parties.party_number%TYPE;
20: l_rel_id NUMBER;
21: l_rel_party_id NUMBER;
22: l_org_contact_rec hz_party_contact_v2pub.org_contact_rec_type;
23: l_org_contact_id NUMBER;
30: l_rel_party_rec := NULL;
31:
32: l_rel_rec.object_id := p_vendor_party_id;
33: l_rel_rec.object_type := 'ORGANIZATION';
34: l_rel_rec.object_table_name := 'HZ_PARTIES';
35: l_rel_rec.subject_id := p_person_party_id;
36: l_rel_rec.subject_type := 'PERSON';
37: l_rel_rec.subject_table_name := 'HZ_PARTIES';
38: l_rel_rec.relationship_code := 'CONTACT_OF';
33: l_rel_rec.object_type := 'ORGANIZATION';
34: l_rel_rec.object_table_name := 'HZ_PARTIES';
35: l_rel_rec.subject_id := p_person_party_id;
36: l_rel_rec.subject_type := 'PERSON';
37: l_rel_rec.subject_table_name := 'HZ_PARTIES';
38: l_rel_rec.relationship_code := 'CONTACT_OF';
39: l_rel_rec.relationship_type := 'CONTACT';
40: l_rel_rec.start_date := Sysdate;
41: l_rel_rec.end_date := p_inactive_date;
107: x_person_party_id OUT nocopy NUMBER
108: )
109: IS
110: l_person_party_rec hz_party_v2pub.party_rec_type;
111: l_person_party_number hz_parties.party_number%TYPE;
112: l_person_rec hz_party_v2pub.person_rec_type;
113: l_person_profile_id NUMBER;
114: l_method VARCHAR2(30);
115: l_step VARCHAR2(100);
321: like name,email,phone number,fax etc.
322: Parameters :
323:
324: IN :
325: p_contact_party_id - holds party id of the 'PERSON' party record in hz_parties.
326: p_vendor_party_id - holds party id of the 'ORGANIZATION' party record in hz_parties.
327: p_first_name - first name of the contact
328: p_last_name - last name of the contact
329: p_middle_name - middle name of the contact
322: Parameters :
323:
324: IN :
325: p_contact_party_id - holds party id of the 'PERSON' party record in hz_parties.
326: p_vendor_party_id - holds party id of the 'ORGANIZATION' party record in hz_parties.
327: p_first_name - first name of the contact
328: p_last_name - last name of the contact
329: p_middle_name - middle name of the contact
330: p_contact_title - contact title of the contact
332: p_phone_number - phone number of the contact
333: p_fax_number - fax number of the contact
334: p_email_address - email address of the contact
335: p_inactive_date - inactive date of the contact
336: p_party_object_version_number - object version number of the relationship record in hz_parties
337: p_email_object_version_number - object version number of the email contact in hz_contact_points
338: p_phone_object_version_number - object version number of the phone contact in hz_contact_points
339: p_fax_object_version_number - object version number of the fax contact in hz_contact_points
340: p_rel_object_version_number - object version number of the relationship record in hz_relationships
338: p_phone_object_version_number - object version number of the phone contact in hz_contact_points
339: p_fax_object_version_number - object version number of the fax contact in hz_contact_points
340: p_rel_object_version_number - object version number of the relationship record in hz_relationships
341: p_cont_object_version_number - object version number of the hz_org_contacts record
342: p_person_party_obversion_num - object version number of the 'PERSON' party record in hz_parties
343:
344: OUT :
345: x_return_status - returns either success/failure
346: x_msg_count - returns the number of error messages
382: person_middle_name,
383: person_pre_name_adjunct,
384: person_title,
385: object_version_number
386: FROM hz_parties
387: WHERE party_id = p_contact_party_id;
388:
389: l_contact_party_rec l_contact_party_cur%ROWTYPE;
390: l_person_rec hz_party_v2pub.person_rec_type;
398: hzr.object_version_number rel_object_version_number,
399: hzr.party_id,
400: hzr.relationship_id,
401: hp.object_version_number rel_party_obj_ver_num
402: FROM hz_org_contacts hoc, hz_relationships hzr, hz_parties hp
403: WHERE hoc.party_relationship_id = hzr.relationship_id
404: AND hzr.object_table_name = 'HZ_PARTIES'
405: AND hzr.object_id = p_vendor_party_id
406: AND hzr.subject_table_name = 'HZ_PARTIES'
400: hzr.relationship_id,
401: hp.object_version_number rel_party_obj_ver_num
402: FROM hz_org_contacts hoc, hz_relationships hzr, hz_parties hp
403: WHERE hoc.party_relationship_id = hzr.relationship_id
404: AND hzr.object_table_name = 'HZ_PARTIES'
405: AND hzr.object_id = p_vendor_party_id
406: AND hzr.subject_table_name = 'HZ_PARTIES'
407: AND hzr.subject_id = p_contact_party_id
408: AND hzr.relationship_type = 'CONTACT'
402: FROM hz_org_contacts hoc, hz_relationships hzr, hz_parties hp
403: WHERE hoc.party_relationship_id = hzr.relationship_id
404: AND hzr.object_table_name = 'HZ_PARTIES'
405: AND hzr.object_id = p_vendor_party_id
406: AND hzr.subject_table_name = 'HZ_PARTIES'
407: AND hzr.subject_id = p_contact_party_id
408: AND hzr.relationship_type = 'CONTACT'
409: AND hzr.relationship_code = 'CONTACT_OF'
410: AND hzr.party_id = hp.party_id;