304: IS
305: x VARCHAR2(1);
306: l_contact_type_code jtf_task_contacts.contact_type_code%TYPE;
307:
308: l_person_party_id hz_parties.party_id%TYPE;
309: l_rel_party_id hz_parties.party_id%TYPE;
310:
311: cursor get_party_ids (p_contact_id Number) Is
312: select pc.party_id, pc.subject_party_id
305: x VARCHAR2(1);
306: l_contact_type_code jtf_task_contacts.contact_type_code%TYPE;
307:
308: l_person_party_id hz_parties.party_id%TYPE;
309: l_rel_party_id hz_parties.party_id%TYPE;
310:
311: cursor get_party_ids (p_contact_id Number) Is
312: select pc.party_id, pc.subject_party_id
313: from jtf_party_all_contacts_v pc,
1139: IS
1140: CURSOR c_party_id
1141: IS
1142: SELECT party_id
1143: FROM hz_parties
1144: WHERE party_id = p_party_id;
1145:
1146: CURSOR c_party_number
1147: IS
1145:
1146: CURSOR c_party_number
1147: IS
1148: SELECT party_id
1149: FROM hz_parties
1150: WHERE party_number = p_party_number;
1151: BEGIN
1152: x_return_status := fnd_api.g_ret_sts_success;
1153:
2874: RETURN NULL;
2875: ELSE
2876: SELECT party_name
2877: INTO l_customer_name
2878: FROM hz_parties
2879: WHERE party_id = p_customer_id;
2880: END IF;
2881:
2882: RETURN l_customer_name;
3991: ** the contact(s)
3992: ** for the incoming task
3993: */
3994:
3995: select 'Party exists' into l_dummy from hz_parties
3996: where party_id in (select contact_id id
3997: from jtf_task_contacts
3998: where task_id = p_task_id
3999: and contact_id = p_object_id);
4023: ** the Source
4024: ** for the incoming task
4025: */
4026:
4027: select 'Party exists' into l_dummy from hz_parties
4028: where party_id in (select source_object_id
4029: from jtf_tasks_b
4030: where task_id = p_task_id
4031: and source_object_id = p_object_id);
4047: if l_delete_status then
4048:
4049: begin
4050:
4051: select 'party exists' into l_dummy from hz_parties
4052: where party_id = (select customer_id
4053: from jtf_tasks_b
4054: where task_id = p_task_id
4055: and customer_id = p_object_id);
4073: if l_delete_status then
4074:
4075: begin
4076:
4077: select 'party exists' into l_dummy from hz_parties
4078: where party_id in (select resource_id id
4079: from jtf_task_assignments
4080: where task_id = p_task_id
4081: and resource_id = p_object_id);
4120:
4121: IS
4122:
4123: l_reference_id jtf_task_references_b.task_reference_id%type;
4124: l_object_id hz_parties.party_id%type;
4125: l_subject_id hz_parties.party_id%type;
4126: l_party_name hz_parties.party_name%type;
4127: l_party_type hz_parties.party_type%type;
4128: l_task_type jtf_tasks_b.task_type_id%type;
4121: IS
4122:
4123: l_reference_id jtf_task_references_b.task_reference_id%type;
4124: l_object_id hz_parties.party_id%type;
4125: l_subject_id hz_parties.party_id%type;
4126: l_party_name hz_parties.party_name%type;
4127: l_party_type hz_parties.party_type%type;
4128: l_task_type jtf_tasks_b.task_type_id%type;
4129: l_api_version CONSTANT NUMBER := 1.0;
4122:
4123: l_reference_id jtf_task_references_b.task_reference_id%type;
4124: l_object_id hz_parties.party_id%type;
4125: l_subject_id hz_parties.party_id%type;
4126: l_party_name hz_parties.party_name%type;
4127: l_party_type hz_parties.party_type%type;
4128: l_task_type jtf_tasks_b.task_type_id%type;
4129: l_api_version CONSTANT NUMBER := 1.0;
4130:
4123: l_reference_id jtf_task_references_b.task_reference_id%type;
4124: l_object_id hz_parties.party_id%type;
4125: l_subject_id hz_parties.party_id%type;
4126: l_party_name hz_parties.party_name%type;
4127: l_party_type hz_parties.party_type%type;
4128: l_task_type jtf_tasks_b.task_type_id%type;
4129: l_api_version CONSTANT NUMBER := 1.0;
4130:
4131: cursor c_type (b_task_id jtf_tasks_b.task_id%type) is
4132: select task_type_id
4133: from jtf_tasks_b
4134: where task_id = b_task_id;
4135:
4136: cursor c_party (b_party_id hz_parties.party_id%type) is
4137: select party_name,
4138: party_type
4139: from hz_parties
4140: where party_id = b_party_id;
4135:
4136: cursor c_party (b_party_id hz_parties.party_id%type) is
4137: select party_name,
4138: party_type
4139: from hz_parties
4140: where party_id = b_party_id;
4141:
4142: cursor c_relation (b_relation_id hz_parties.party_id%type) is
4143: select object_id,
4138: party_type
4139: from hz_parties
4140: where party_id = b_party_id;
4141:
4142: cursor c_relation (b_relation_id hz_parties.party_id%type) is
4143: select object_id,
4144: subject_id
4145: from hz_relationships
4146: where party_id = b_relation_id
4336: IS
4337:
4338: l_reference_id jtf_task_references_b.task_reference_id%type;
4339: l_object_version jtf_task_references_b.object_version_number%type;
4340: l_object_id hz_parties.party_id%type;
4341: l_subject_id hz_parties.party_id%type;
4342: l_party_type hz_parties.party_type%type;
4343: l_task_type jtf_tasks_b.task_type_id%type;
4344: l_api_version CONSTANT NUMBER := 1.0;
4337:
4338: l_reference_id jtf_task_references_b.task_reference_id%type;
4339: l_object_version jtf_task_references_b.object_version_number%type;
4340: l_object_id hz_parties.party_id%type;
4341: l_subject_id hz_parties.party_id%type;
4342: l_party_type hz_parties.party_type%type;
4343: l_task_type jtf_tasks_b.task_type_id%type;
4344: l_api_version CONSTANT NUMBER := 1.0;
4345:
4338: l_reference_id jtf_task_references_b.task_reference_id%type;
4339: l_object_version jtf_task_references_b.object_version_number%type;
4340: l_object_id hz_parties.party_id%type;
4341: l_subject_id hz_parties.party_id%type;
4342: l_party_type hz_parties.party_type%type;
4343: l_task_type jtf_tasks_b.task_type_id%type;
4344: l_api_version CONSTANT NUMBER := 1.0;
4345:
4346: cursor c_type (b_task_id jtf_tasks_b.task_id%type) is
4347: select task_type_id
4348: from jtf_tasks_b
4349: where task_id = b_task_id;
4350:
4351: cursor c_party (b_party_id hz_parties.party_id%type) is
4352: select party_type
4353: from hz_parties
4354: where party_id = b_party_id;
4355:
4349: where task_id = b_task_id;
4350:
4351: cursor c_party (b_party_id hz_parties.party_id%type) is
4352: select party_type
4353: from hz_parties
4354: where party_id = b_party_id;
4355:
4356: cursor c_relation (b_relation_id hz_parties.party_id%type) is
4357: select object_id,
4352: select party_type
4353: from hz_parties
4354: where party_id = b_party_id;
4355:
4356: cursor c_relation (b_relation_id hz_parties.party_id%type) is
4357: select object_id,
4358: subject_id
4359: from hz_relationships
4360: where party_id = b_relation_id
4360: where party_id = b_relation_id
4361: and directional_flag = 'F' ;
4362:
4363: cursor c_reference (b_task_id jtf_tasks_b.task_id%type,
4364: b_party_id hz_parties.party_id%type) is
4365: select task_reference_id,
4366: object_version_number
4367: from jtf_task_references_b
4368: where task_id = b_task_id