DBA Data[Home] [Help]

APPS.AS_SALES_LEADS_PVT dependencies on AS_ACCESSES_ALL

Line 4011: -- Create access security in as_accesses_all

4007:
4008: -- Create access record
4009: IF l_sales_lead_rec.assign_to_salesforce_id IS NOT NULL AND
4010: l_sales_lead_rec.assign_to_salesforce_id <> FND_API.G_MISS_NUM THEN
4011: -- Create access security in as_accesses_all
4012: -- l_Sales_Team_Rec.access_id := FND_API.G_MISS_NUM;
4013: l_Sales_Team_Rec.last_update_date := SYSDATE;
4014: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
4015: l_Sales_Team_Rec.creation_date := SYSDATE;

Line 4352: From as_accesses_all

4348: -- ,reassign_requested_person_id
4349: -- ,reassign_request_date
4350: -- ,internal_update_access
4351: ,sales_lead_id
4352: From as_accesses_all
4353: Where sales_lead_id = X_Sales_Lead_Id
4354: and salesforce_id = c_salesforce_id
4355: and nvl(sales_group_id, -99) = nvl(c_sales_group_id, -99);
4356:

Line 4433: from as_accesses_all a

4429: and resource_id = x_resource_id;
4430:
4431: CURSOR c_check_owner(c_sales_lead_id NUMBER , c_identity_salesforce_id NUMBER) IS
4432: select 'Y'
4433: from as_accesses_all a
4434: where a.sales_lead_id = c_sales_lead_id
4435: and a.owner_flag = 'Y'
4436: and a.salesforce_id = c_identity_salesforce_id;
4437:

Line 4451: from as_accesses_all a

4447:
4448:
4449: CURSOR c_check_salesteam(c_sales_lead_id NUMBER , c_salesforce_id NUMBER, c_sales_group_id NUMBER) IS
4450: select 'Y'
4451: from as_accesses_all a
4452: where a.sales_lead_id = c_sales_lead_id
4453: and a.salesforce_id = c_salesforce_id
4454: and nvl(a.sales_group_id, -99) = nvl(c_sales_group_id,-99);
4455:

Line 5165: -- These values l_new/old_status_open_flag will be used later in API to update AS_ACCESSES_ALL

5161: END IF;
5162:
5163:
5164: -- We can simply log the l_new_status_flag into the STATUS_OPEN_FLAG field.
5165: -- These values l_new/old_status_open_flag will be used later in API to update AS_ACCESSES_ALL
5166:
5167:
5168: -- Update lead_rank_score as well.
5169:

Line 5738: -- Create access security in as_accesses_all

5734: IF l_assign_to_salesforce_id IS NULL AND
5735: l_tar_SALES_LEAD_rec.assign_to_salesforce_id IS NOT NULL AND
5736: l_tar_SALES_LEAD_rec.assign_to_salesforce_id <> FND_API.G_MISS_NUM
5737: THEN
5738: -- Create access security in as_accesses_all
5739: -- l_Sales_Team_Rec.access_id := FND_API.G_MISS_NUM;
5740: l_Sales_Team_Rec.last_update_date := SYSDATE;
5741: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
5742: l_Sales_Team_Rec.creation_date := SYSDATE;

Line 5818: -- Get access record in as_accesses_all by sales_lead_id

5814: -- FND_API.G_MISS_NUM AND
5815: -- l_tar_SALES_LEAD_rec.assign_to_salesforce_id <>
5816: -- l_assign_to_salesforce_id
5817: THEN
5818: -- Get access record in as_accesses_all by sales_lead_id
5819:
5820: -- if the assign to is being cleared, then the cursor will not work if use null
5821: -- use the old assign to (database value) instead.
5822:

Line 6235: -- Create another entry in the as_accesses_all for the new owner

6231:
6232: */
6233:
6234:
6235: -- Create another entry in the as_accesses_all for the new owner
6236: -- use some of the fields from those already set in the record.
6237:
6238: -- this needs to be done only is doing new create_sales_team
6239: --l_Sales_Team_Rec.last_update_date := SYSDATE;

Line 6351: -- then the denormed flag in as_accesses_all needs to change for all

6347:
6348:
6349:
6350: -- if we are changing status from open to closed or closed to open,
6351: -- then the denormed flag in as_accesses_all needs to change for all
6352: -- records for this sales_lead_id
6353:
6354: if (l_old_status_flag = 'Y' AND l_new_status_flag = 'N') then
6355:

Line 6356: update as_accesses_all

6352: -- records for this sales_lead_id
6353:
6354: if (l_old_status_flag = 'Y' AND l_new_status_flag = 'N') then
6355:
6356: update as_accesses_all
6357: set open_flag = null , last_update_date = sysdate,
6358: last_updated_by = fnd_global.user_id,
6359: last_update_login = fnd_global.conc_login_id
6360: where sales_lead_id = l_tar_SALES_LEAD_rec.SALES_LEAD_ID;

Line 6364: update as_accesses_all

6360: where sales_lead_id = l_tar_SALES_LEAD_rec.SALES_LEAD_ID;
6361:
6362: elsif ( l_old_status_flag = 'N' AND l_new_status_flag = 'Y') then
6363:
6364: update as_accesses_all
6365: set open_flag = 'Y', last_update_date = sysdate,
6366: last_updated_by = fnd_global.user_id,
6367: last_update_login = fnd_global.conc_login_id
6368: where sales_lead_id = l_tar_SALES_LEAD_rec.SALES_LEAD_ID;

Line 6378: -- null rank, then lead_rank_score in as_accesses_all was not getting updated.

6374:
6375:
6376:
6377: -- fixing problem found during testing that if u updated lead e.g from Cold Lead to
6378: -- null rank, then lead_rank_score in as_accesses_all was not getting updated.
6379:
6380:
6381: -- if new rank is null, we want to fix the score since old might have been non null.
6382: -- if new rank is g_miss , means anyways the rank is not changing so score is not changing.

Line 6384: -- is g_miss then dont update as_accesses_all, basically simulate table handler

6380:
6381: -- if new rank is null, we want to fix the score since old might have been non null.
6382: -- if new rank is g_miss , means anyways the rank is not changing so score is not changing.
6383: -- since we are re-using code from denorming for as_sales_leads, if l_new_lead_rank_score
6384: -- is g_miss then dont update as_accesses_all, basically simulate table handler
6385:
6386: if ( l_new_lead_rank_score <> FND_API.G_MISS_NUM ) THEN
6387: -- update the as_accesses_all.lead_rank_score if the rank has been changed i.e not g_miss
6388: update as_accesses_all

Line 6387: -- update the as_accesses_all.lead_rank_score if the rank has been changed i.e not g_miss

6383: -- since we are re-using code from denorming for as_sales_leads, if l_new_lead_rank_score
6384: -- is g_miss then dont update as_accesses_all, basically simulate table handler
6385:
6386: if ( l_new_lead_rank_score <> FND_API.G_MISS_NUM ) THEN
6387: -- update the as_accesses_all.lead_rank_score if the rank has been changed i.e not g_miss
6388: update as_accesses_all
6389: set lead_rank_score = l_new_lead_rank_score , last_update_date = sysdate,
6390: last_updated_by = fnd_global.user_id,
6391: last_update_login = fnd_global.conc_login_id

Line 6388: update as_accesses_all

6384: -- is g_miss then dont update as_accesses_all, basically simulate table handler
6385:
6386: if ( l_new_lead_rank_score <> FND_API.G_MISS_NUM ) THEN
6387: -- update the as_accesses_all.lead_rank_score if the rank has been changed i.e not g_miss
6388: update as_accesses_all
6389: set lead_rank_score = l_new_lead_rank_score , last_update_date = sysdate,
6390: last_updated_by = fnd_global.user_id,
6391: last_update_login = fnd_global.conc_login_id
6392: where sales_lead_id = l_tar_SALES_LEAD_rec.SALES_LEAD_ID;