DBA Data[Home] [Help]

APPS.AS_SALES_LEADS_PUB dependencies on AS_ACCESSES_ALL

Line 36: -- 02/06/2003 AJOY Skipped looking into AS_ACCESSES_ALL for immature owner

32: -- 08/06/2002 SOLIN Comment out API Get_Potential_Opportunity because
33: -- it's moved to package AS_LINK_LEAD_OPP_PUB.
34: -- 11/04/2002 SOLIN Add API Lead_Process_After_Create and
35: -- Lead_Process_After_Update
36: -- 02/06/2003 AJOY Skipped looking into AS_ACCESSES_ALL for immature owner
37: -- Manual access is taken care before calling ROUTE_LEAD_TO_MARKETING
38: -- 03/07/2003 SOLIN Bug 2822580
39: -- Route_Lead_To_Marketing should remove access records
40: -- when lead is updated.

Line 47: -- Update as_accesses_all when owner has record already

43: -- 03/20/2003 SOLIN Bug 2858785
44: -- Update address_id when user change address.
45: -- To avoid duplicate record.
46: -- 03/26/2003 SOLIN Bug 2863580
47: -- Update as_accesses_all when owner has record already
48: -- in route_lead_to_marketing.
49: -- 04/23/2003 SOLIN Bug 2921021
50: -- Route_Lead_To_Marketing should log lead_rank_id,
51: -- assign_sales_group_id, qualified_flag in

Line 58: -- for as_accesses_all table once a new owner is found.

54: -- Route_Lead_To_Marketing should set accept_flag to 'N'
55: -- if owner is changed.
56: -- 06/16/2003 SOLIN Bug 3007246
57: -- Route_Lead_To_Marketing should update sales_group_id
58: -- for as_accesses_all table once a new owner is found.
59: -- 08/19/2003 SOLIN Bug 3102332
60: -- Use type JTF_NUMBER_TABLE, instead of NUMBER_TABLE
61: --
62: -- End of Comments

Line 4139: -- AS_ACCESSES_ALL table.

4135: l_owner_exists_flag VARCHAR2(1);
4136:
4137: -- Get access_id, terr_id for the records that come from LEAD territory.
4138: -- Delete these records before new resource records are created in
4139: -- AS_ACCESSES_ALL table.
4140: CURSOR C_Get_Acc_Terr(c_sales_lead_id NUMBER) IS
4141: SELECT ACC.ACCESS_ID, TERRACC.TERRITORY_ID
4142: FROM AS_ACCESSES_ALL ACC, AS_TERRITORY_ACCESSES TERRACC
4143: WHERE ACC.FREEZE_FLAG = 'N'

Line 4142: FROM AS_ACCESSES_ALL ACC, AS_TERRITORY_ACCESSES TERRACC

4138: -- Delete these records before new resource records are created in
4139: -- AS_ACCESSES_ALL table.
4140: CURSOR C_Get_Acc_Terr(c_sales_lead_id NUMBER) IS
4141: SELECT ACC.ACCESS_ID, TERRACC.TERRITORY_ID
4142: FROM AS_ACCESSES_ALL ACC, AS_TERRITORY_ACCESSES TERRACC
4143: WHERE ACC.FREEZE_FLAG = 'N'
4144: AND ACC.SALES_LEAD_ID = c_sales_lead_id
4145: AND ACC.ACCESS_ID = TERRACC.ACCESS_ID;
4146: -- Bug 2822580, SOLIN, 03/07/2003, end

Line 4196: FROM as_accesses_all acc

4192:
4193: -- Check whether owner exists or not
4194: CURSOR c_check_owner_exists(c_sales_lead_id NUMBER) IS
4195: SELECT 'Y'
4196: FROM as_accesses_all acc
4197: WHERE acc.sales_lead_id = c_sales_lead_id
4198: AND acc.owner_flag = 'Y';
4199:
4200: -- Check whether the resource is in the sales team or not.

Line 4205: FROM as_accesses_all acc

4201: -- Group_id is not required to check here because no group_id is always
4202: -- from c_get_group_id cursor.
4203: CURSOR c_check_sales_team(c_resource_id NUMBER, c_sales_lead_id NUMBER) IS
4204: SELECT acc.access_id
4205: FROM as_accesses_all acc
4206: WHERE acc.salesforce_id = c_resource_id
4207: AND acc.sales_lead_id = c_sales_lead_id;
4208: BEGIN
4209: SAVEPOINT ROUTE_LEAD_TO_MARKETING_PUB;

Line 4264: DELETE FROM AS_ACCESSES_ALL

4260: END LOOP;
4261: END IF;
4262:
4263: FORALL l_i IN 1..l_ta_access_id_tbl.count
4264: DELETE FROM AS_ACCESSES_ALL
4265: WHERE ACCESS_ID = l_ta_access_id_tbl(l_i);
4266:
4267: FORALL l_i IN 1..l_ta_terr_id_tbl.count
4268: DELETE FROM AS_TERRITORY_ACCESSES

Line 4274: DELETE FROM as_accesses_all acc

4270: AND TERRITORY_ID = l_ta_terr_id_tbl(l_i);
4271: END IF;
4272:
4273: -- Delete non-frozen resources who are not from territory.
4274: DELETE FROM as_accesses_all acc
4275: WHERE acc.sales_lead_id = p_sales_lead_id
4276: AND acc.freeze_flag = 'N'
4277: --AND acc.salesforce_id <> p_identity_salesforce_id
4278: AND NOT EXISTS (

Line 4312: -- remove owner in as_accesses_all

4308: l_lead_rank_id;
4309: CLOSE get_sales_lead_csr;
4310:
4311: -- Check owner again here because the above delete may
4312: -- remove owner in as_accesses_all
4313: l_owner_exists_flag := 'N';
4314: OPEN c_check_owner_exists(p_sales_lead_id);
4315: FETCH c_check_owner_exists INTO l_owner_exists_flag;
4316: CLOSE c_check_owner_exists;

Line 4329: UPDATE as_accesses_all

4325: END IF;
4326:
4327: -- Bug 2858785
4328: -- Update address_id when user change address.
4329: UPDATE as_accesses_all
4330: SET address_id = l_address_id
4331: WHERE sales_lead_id = p_sales_lead_id;
4332: -- end Bug 2858785
4333:

Line 4408: -- ckapoor 052902 Bug that owner is not set in as_accesses_all

4404:
4405: l_Sales_Team_Rec.person_id := l_person_id;
4406: l_sales_team_rec.sales_group_id := NULL;
4407: l_Sales_Team_Rec.salesforce_id := l_salesforce_id;
4408: -- ckapoor 052902 Bug that owner is not set in as_accesses_all
4409: -- Also created by TAP flag explicitly marked as 'N'
4410: l_Sales_Team_Rec.owner_flag := 'Y';
4411: l_Sales_Team_Rec.created_by_TAP_flag := 'N';
4412: l_Sales_Team_Rec.team_leader_flag := 'Y';

Line 4443: UPDATE as_accesses_all

4439: ,x_msg_data => x_msg_data
4440: ,x_access_id => l_Access_Id
4441: );
4442: ELSE
4443: UPDATE as_accesses_all
4444: SET owner_flag = 'Y',
4445: sales_group_id = l_group_id
4446: WHERE access_id = l_access_id;
4447: END IF;