86: -- ******************************************************************
87: -- Validate Environment
88: -- ******************************************************************
89:
90: IF FND_GLOBAL.User_Id IS NULL
91: THEN
92: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
93: THEN
94: AS_UTILITY_PVT.Set_Message(
498: l_lead_workflow_rec.failure_code := l_failure_code;
499: l_lead_workflow_rec.failure_message := l_msg_data;
500:
501: -- Create a row in PV Lead Workflow table.
502: l_lead_workflow_rec.last_updated_by := fnd_global.user_id;
503: l_lead_workflow_rec.created_by := fnd_global.user_id;
504: l_lead_workflow_rec.lead_id := l_lead_id;
505: l_lead_workflow_rec.entity := 'OPPORTUNITY';
506: l_lead_workflow_rec.wf_item_type :=
499: l_lead_workflow_rec.failure_message := l_msg_data;
500:
501: -- Create a row in PV Lead Workflow table.
502: l_lead_workflow_rec.last_updated_by := fnd_global.user_id;
503: l_lead_workflow_rec.created_by := fnd_global.user_id;
504: l_lead_workflow_rec.lead_id := l_lead_id;
505: l_lead_workflow_rec.entity := 'OPPORTUNITY';
506: l_lead_workflow_rec.wf_item_type :=
507: pv_workflow_pub.g_wf_itemtype_pvasgnmt;
544: l_Sales_Team_Rec.address_id;
545: CLOSE c_get_lead_info;
546:
547: -- Create a sales team member for the opportunity
548: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
549: l_Sales_Team_Rec.last_update_date := SYSDATE;
550: l_Sales_Team_Rec.creation_date := SYSDATE;
551: l_Sales_Team_Rec.created_by := FND_GLOBAL.USER_ID;
552: l_Sales_Team_Rec.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
547: -- Create a sales team member for the opportunity
548: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
549: l_Sales_Team_Rec.last_update_date := SYSDATE;
550: l_Sales_Team_Rec.creation_date := SYSDATE;
551: l_Sales_Team_Rec.created_by := FND_GLOBAL.USER_ID;
552: l_Sales_Team_Rec.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
553:
554:
555: -- ----------------------------------------------------------------------
548: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
549: l_Sales_Team_Rec.last_update_date := SYSDATE;
550: l_Sales_Team_Rec.creation_date := SYSDATE;
551: l_Sales_Team_Rec.created_by := FND_GLOBAL.USER_ID;
552: l_Sales_Team_Rec.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
553:
554:
555: -- ----------------------------------------------------------------------
556: -- Run Create_Salesteam only when an assignment manager is found in the
730: -- ******************************************************************
731: -- Validate Environment
732: -- ******************************************************************
733:
734: IF FND_GLOBAL.User_Id IS NULL
735: THEN
736: IF FND_MSG_PUB.Check_Msg_Level (FND_MSG_PUB.G_MSG_LVL_ERROR)
737: THEN
738: AS_UTILITY_PVT.Set_Message(
1152: l_lead_workflow_rec.failure_code := l_failure_code;
1153: l_lead_workflow_rec.failure_message := l_msg_data;
1154:
1155: -- Create a row in PV Lead Workflow table.
1156: l_lead_workflow_rec.last_updated_by := fnd_global.user_id;
1157: l_lead_workflow_rec.created_by := fnd_global.user_id;
1158: l_lead_workflow_rec.lead_id := l_lead_id;
1159: l_lead_workflow_rec.entity := 'OPPORTUNITY';
1160: l_lead_workflow_rec.wf_item_type := pv_workflow_pub.g_wf_itemtype_pvasgnmt;
1153: l_lead_workflow_rec.failure_message := l_msg_data;
1154:
1155: -- Create a row in PV Lead Workflow table.
1156: l_lead_workflow_rec.last_updated_by := fnd_global.user_id;
1157: l_lead_workflow_rec.created_by := fnd_global.user_id;
1158: l_lead_workflow_rec.lead_id := l_lead_id;
1159: l_lead_workflow_rec.entity := 'OPPORTUNITY';
1160: l_lead_workflow_rec.wf_item_type := pv_workflow_pub.g_wf_itemtype_pvasgnmt;
1161: l_lead_workflow_rec.wf_status := pv_assignment_pub.g_wf_status_closed;
1193:
1194: -- Create a sales team member for the opportunity
1195: l_Sales_Team_Rec.customer_id := l_customer_id;
1196: l_Sales_Team_Rec.address_id := l_address_id;
1197: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
1198: l_Sales_Team_Rec.last_update_date := SYSDATE;
1199: l_Sales_Team_Rec.creation_date := SYSDATE;
1200: l_Sales_Team_Rec.created_by := FND_GLOBAL.USER_ID;
1201: l_Sales_Team_Rec.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
1196: l_Sales_Team_Rec.address_id := l_address_id;
1197: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
1198: l_Sales_Team_Rec.last_update_date := SYSDATE;
1199: l_Sales_Team_Rec.creation_date := SYSDATE;
1200: l_Sales_Team_Rec.created_by := FND_GLOBAL.USER_ID;
1201: l_Sales_Team_Rec.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
1202:
1203: -- ----------------------------------------------------------------------
1204: -- Run Create_Salesteam only when an assignment manager is found in the
1197: l_Sales_Team_Rec.last_updated_by := FND_GLOBAL.USER_ID;
1198: l_Sales_Team_Rec.last_update_date := SYSDATE;
1199: l_Sales_Team_Rec.creation_date := SYSDATE;
1200: l_Sales_Team_Rec.created_by := FND_GLOBAL.USER_ID;
1201: l_Sales_Team_Rec.last_update_login := FND_GLOBAL.CONC_LOGIN_ID;
1202:
1203: -- ----------------------------------------------------------------------
1204: -- Run Create_Salesteam only when an assignment manager is found in the
1205: -- profile PV_BATCH_ASSIGN_USER_NAME ().