[Home] [Help]
1146: END TASK_AUDIT_MERGE_OLD_ADDRESS;
1147:
1148: ------------------------------------------------------------------------------------------
1149: -- Procedure: TASK_MERGE_CONTACTS
1150: -- Performs party_id merge in JTF_TASK_CONTACTS table.
1151: -- Columns: CONTACT_ID where CONTACT_TYPE_CODE = 'CUST'
1152: ------------------------------------------------------------------------------------------
1153:
1154: PROCEDURE TASK_MERGE_CONTACTS(
1201:
1202:
1203: -- If the parent has changed(ie. Parent is getting merged) then transfer the
1204: -- dependent record to the new parent.
1205: -- For JTF_TASK_CONTACTS table, if party_id 1000 got merged to party_id 2000
1206: -- then, we have to update all records with contact_id = 1000 to 2000
1207: -- for contacts of type 'Customer' - contact_type_code = 'CUST'
1208:
1209: if p_from_fk_id <> p_to_fk_id then
1207: -- for contacts of type 'Customer' - contact_type_code = 'CUST'
1208:
1209: if p_from_fk_id <> p_to_fk_id then
1210:
1211: UPDATE jtf_task_contacts
1212: SET contact_id = p_to_fk_id,
1213: last_update_date = hz_utility_pub.last_update_date,
1214: last_updated_by = hz_utility_pub.user_id,
1215: last_update_login = hz_utility_pub.last_update_login,