124:
125: CURSOR c_task_src (b_task_id NUMBER) IS
126: SELECT tb.source_object_type_code
127: FROM jtf_object_usages ou,
128: jtf_tasks_b tb
129: WHERE
130: tb.task_id = b_task_id and
131: ou.object_user_code = 'NOTES' and
132: ou.object_code = tb.source_object_type_code;
488:
489: -- 09/24/03 commented this code because getting the object_version_number from p_action_input_data. (fix bug 3127477)
490: /*
491: SELECT object_version_number INTO l_object_version_number
492: FROM jtf_tasks_b WHERE task_id = l_task_rec_tbl(i).id;
493: */
494:
495: -- call the update_task api to update the task object
496: --INSERT INTO msista_Tmp values (50, 'calling update_task, with params :- ');
708: -- we have to do some additional work if 'auto-relate note' is true
709: IF (FND_PROFILE.VALUE('IEU_AUTO_RELATED') = 'Y') THEN -- this is for source document
710: l_continue := 0;
711: select count(source_object_id) into l_continue
712: from jtf_tasks_b
713: where task_id = l_task_rec_tbl(i).id;
714:
715: if (l_continue > 0) then
716: select source_object_id into l_note_context_type_id
713: where task_id = l_task_rec_tbl(i).id;
714:
715: if (l_continue > 0) then
716: select source_object_id into l_note_context_type_id
717: from jtf_tasks_b
718: where task_id = l_task_rec_tbl(i).id;
719: else l_note_context_type_id := null;
720: end if;
721:
755:
756: IF (FND_PROFILE.VALUE('AS_NOTES_LEAD_CUSTOMER') = 'Y') THEN
757: l_continue := 0;
758: select count(customer_id) into l_continue
759: from jtf_tasks_b
760: where task_id = l_task_rec_tbl(i).id;
761:
762: if (l_continue > 0) then
763: select customer_id into l_note_context_type_id
760: where task_id = l_task_rec_tbl(i).id;
761:
762: if (l_continue > 0) then
763: select customer_id into l_note_context_type_id
764: from jtf_tasks_b
765: where task_id = l_task_rec_tbl(i).id;
766: else l_note_context_type_id := null;
767: end if;
768:
855: --INSERT INTO msista_Tmp values (70, 'auto related profile is YES' );
856: --commit;
857: l_continue := 0;
858: select count(customer_id) into l_continue
859: from jtf_tasks_b
860: where task_id = l_task_rec_tbl(i).id;
861:
862: if (l_continue > 0) then
863: select customer_id into l_note_context_type_id
860: where task_id = l_task_rec_tbl(i).id;
861:
862: if (l_continue > 0) then
863: select customer_id into l_note_context_type_id
864: from jtf_tasks_b
865: where task_id = l_task_rec_tbl(i).id;
866: else l_note_context_type_id := null;
867: end if;
868:
961: select count(a.object_id) into l_continue
962: from hz_relationships a, hz_parties b
963: where b.party_type = 'PARTY_RELATIONSHIP'
964: and a.party_id in (select source_object_id
965: from jtf_tasks_b
966: where task_id = l_task_rec_tbl(i).id)
967: and a.party_id = b.party_id
968: and a.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
969: AND a.OBJECT_TABLE_NAME = 'HZ_PARTIES'
973: select a.object_id into l_note_context_type_id
974: from hz_relationships a, hz_parties b
975: where b.party_type = 'PARTY_RELATIONSHIP'
976: and a.party_id in (select source_object_id
977: from jtf_tasks_b
978: where task_id = l_task_rec_tbl(i).id)
979: and a.party_id = b.party_id
980: and a.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
981: AND a.OBJECT_TABLE_NAME = 'HZ_PARTIES'
1025: select count(a.subject_id) into l_continue
1026: from hz_relationships a, hz_parties b
1027: where b.party_type = 'PARTY_RELATIONSHIP'
1028: and a.party_id = (select source_object_id
1029: from jtf_tasks_b
1030: where task_id = l_task_rec_tbl(i).id)
1031: and a.party_id = b.party_id
1032: and a.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
1033: AND a.OBJECT_TABLE_NAME = 'HZ_PARTIES'
1037: select a.subject_id into l_note_context_type_id
1038: from hz_relationships a, hz_parties b
1039: where b.party_type = 'PARTY_RELATIONSHIP'
1040: and a.party_id = (select source_object_id
1041: from jtf_tasks_b
1042: where task_id = l_task_rec_tbl(i).id)
1043: and a.party_id = b.party_id
1044: and a.SUBJECT_TABLE_NAME = 'HZ_PARTIES'
1045: AND a.OBJECT_TABLE_NAME = 'HZ_PARTIES'