- Tyler Schryver
- NEWBIE
- 10 Points
- Member since 2016
- IS&T Manager
- TransLoc, Inc.
-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
2Questions
-
7Replies
Error Occurred During Flow "Activity_Update_for_Visual_Workflow":UPDATE --- UPDATE FAILED ---- ERRORS: ...
I have this Trigger:
With this Test Class:
When I run the Test Class I get the following email from a Process Flow that is being executed:
Can someone point out the error of my ways?
trigger OnBoardingUpdateFromTask on Task (after update) { List<Customer_OnBoard__c> OnBoardingsToUpdate = new List<Customer_OnBoard__c>(); Map<Id, Customer_OnBoard__c> OnBoardingIDToOnBoardingObjMap = new Map<Id, Customer_OnBoard__c>(); for (Task t: Trigger.new) { if (t.subject=='AWF: RealTime Project Kick Off' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Project_Kick_Off_rt__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Traveler Project Kick-Off' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Project_Kick_Off_TR__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Update Monthly Billing for Customer' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Monthly_Billing_Update__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Renewal Monthly Billing Update' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Renewal_Monthly_Billing__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission Monthly Billing Update' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Decommission_Monthly_Billing_Update__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission Hardware' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Decommission_Hardware__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission OnDemand Vehicles' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Decommission_Vehicles__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Enable Additional Vehicles' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Enable_Additional_Vehicles__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: OnDemand Project Kick-Off' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Project_Kick_Off_OD__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Order Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Order_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Confirm OSM Region Added' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Confirm_OSM_Added__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Finance Confirm Payment Received' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Finance_Confirm_Payment__c = TRUE; o.Confirm_Payment__c = TRUE; o.Confirm_Payment_Count__c = 1; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Confirm Receipt of SIS' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Confirm_SIS_Received__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: GTFS and Backend Setup' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Create_GTFS_Feed_and_Backend_Setup__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Enable Survey' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Enable_Survey__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Send the SIS to Customer' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Send_the_SIS_to_the_Customer__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: RealTime New Product Training' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.New_Product_Training_rt__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Traveler New Product Training' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.New_Product_Training_TR__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: OnDemand New Product Training' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.New_Product_Training_od__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Preview Period' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Preview_Period__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: RealTime Product Go Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Product_Go_Live_RT__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Traveler Product Go Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Product_Go_Live_TR__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: OnDemand Product Go-Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Product_Go_Live_OD__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Provide Credentials to Agency' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Provide_Credentials_to_Agency__c = TRUE; o.Date_OnDemand_Ready__c = Date.today(); OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Request Logo' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Request_Logo__c = TRUE; o.Date_Traveler_Ready__c = Date.TODAY(); OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Ship Units To Customer' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Ship_Units_To_Customer__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Enable Go-Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Weekly_Tasks__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Schedule Travel' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Schedule_Travel__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Check Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Check_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Order Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Order_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Update Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Update_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Submit Expense Form' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Expense_Form__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission Hardware' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Hardware_Decommissioned__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission OnDemand Vehicles' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.OnDemand_Decommission_Product__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } for(Id id : OnBoardingIDToOnBoardingObjMap.keyset()){ Customer_OnBoard__c thisOnb = new Customer_OnBoard__c(); thisOnb = OnBoardingIDToOnBoardingObjMap.get(id); OnBoardingsToUpdate.Add(thisOnb); } try { update OnBoardingsToUpdate; } catch (system.Dmlexception e) { system.debug (e); } } }
With this Test Class:
@isTest (seeAllData=false) private class TestOnBoardingUpdateFromTask { public static List<Task> tasksList; public static List<Opportunity> opportunitiesList; public static List<Account> accountsList; public static String subject; static void init(){ tasksList = new List<Task>(); opportunitiesList = new List<Opportunity>(); accountsList = new List<Account>(); accountsList.add(new Account(Name = 'Test', Sales_Region__c = '1 - Southeast', Type = 'Prospect' )); opportunitiesList = new List<Opportunity>{ new Opportunity( Name = 'Test1', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test2', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test3', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test4', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test5', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, StageName = 'Proposal') }; } static testMethod void testWithExistingTask() { init(); Test.startTest(); tasksList = new List<Task>{new Task( Subject = subject, Status='Completed', Priority = 'Normal' ), new Task(Subject='AWF: RealTime Project Kick Off', Status ='Completed'), new Task(Subject='AWF: RealTime New Product Training' , Status='Completed'), new Task(Subject='AWF: RealTime Product Go Live' , Status='Completed'), new Task(Subject='AWF: Check Inventory', Status='Completed'), new Task(Subject='AWF: Order Inventory' , Status='Completed'), new Task(Subject='AWF: Start Installation Checklist' , Status='Completed'), new Task(Subject='AWF: Ship Units To Customer' , Status='Completed'), new Task(Subject='AWF: Submit Expense Form' , Status='Completed'), new Task(Subject='AWF: Update Inventory' , Status='Completed'), new Task(Subject='AWFl Schedule Travel', Status = 'Completed'), new Task(Subject='AWF: OnDemand Product Go-Live' , Status='Completed'), new Task(Subject='AWF: OnDemand Project Go Live' , Status='Completed'), new Task(Subject='AWF: OnDemand Project Kick-Off' , Status='Completed'), new Task(Subject='AWF: OnDemand New Product Training' , Status = 'Completed'), new Task(Subject='AWF: Traveler New Product Training' , Status='Completed'), new Task(Subject='AWF: Traveler Product Go Live' , Status='Completed'), new Task(Subject='AWF: Traveler Project Kick-Off' , Status='Completed'), new Task(Subject='AWF: Preview Period' , Status='Completed'), new Task(Subject='AWF: Request Logo' , Status='Completed'), new Task(Subject='AWF: Confirm Receipt of SIS' , Status='Completed'), new Task(subject='AWF: Provide Credentials To Agency' , Status='Completed'), new Task(Subject='AWF: Enable Survey' , Status='Completed'), new Task(Subject='AWF: GTFS and Backend Setup' , Status = 'Completed'), new Task(Subject='AWF: Enable Go-Live', Status='Completed') , new Task(Subject='AWF: Confirm OSM Region Added', Status ='Completed'), new Task(Subject='AWF: Enable Additional Vehicles' , Status = 'Completed'), new Task(Subject='AWF: Decommission OnDemand Vehicles', Status = 'Completed'), new Task(Subject='AWF: Decommission Hardware' , Status = 'Completed'), new Task(Subject='AWF: Finance Confirm Payment Received' , Status = 'Completed'), new Task(Subject='AWF: Decommission Monthly Billing Update' , Status = 'Completed'), new Task(Subject='AWF: Renewal Monthly Billing Update' , Status = 'Completed'), new Task(Subject='AWF: Update Monthly Billing for Customer' , Status = 'Completed') }; insert accountsList; insert opportunitiesList; insert tasksList; tasksList = [ SELECT Id, WhatId FROM Task ]; //if (!tasksList.isEmpty()){ Integer i = 0; for(Task t : tasksList){ t.WhatId = opportunitiesList[i].Id; //i++; } update tasksList; //System.assertEqual(tasksList[0].WhatId, opportunitiesList[0].Id); //Test.stopTest(); } }
When I run the Test Class I get the following email from a Process Flow that is being executed:
An error occurred at element myRule_5_A1 (FlowRecordUpdate). UPDATE --- UPDATE FAILED --- ERRORS : (LIMIT_EXCEEDED) System.LimitException: Too many DML statements: 151 ________________________________________ This report lists the elements that the flow interview executed. The report is a beta feature. We welcome your feedback on IdeaExchange. Flow Details Flow Name: Activity_Updates_for_Visual_Workflow Type: Workflow Version: 14 Status: Active Flow Interview Details Interview Label: Activity_Updates_for_Visual_Workflow-14_Task Current User: Chris Fraser (005d00000066RvV) Start time: 11/3/2016 3:12 PM Duration: 0 seconds How the Interview Started Chris Fraser (005d00000066RvV) started the flow interview. Some of this flow's variables were set when the interview started. myVariable_old = null myVariable_current = 00TP000000FJyvpMAD RecursiveCountVariable = 2.00 ASSIGNMENT: myVariable_waitStartTimeAssignment {!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime} Result {!myVariable_waitStartTimeVariable} = "11/3/2016 3:12 PM" DECISION: myDecision DECISION: myDecision2 DECISION: myDecision4 Executed this outcome: myRule_5 Outcome conditions: and 1. {!myVariable_current.Subject} (AWF: OnDemand New Product Training) Contains OnDemand New Product Training 2. {!myVariable_current.IsClosed} (true) Equals true Logic: All conditions must be true (AND) RECORD UPDATE: myRule_5_A1 Find all Task records where: Id Equals {!myVariable_current.Id} (00TP000000FJyvpMAD) Update the records’ field values. New_Product_Training_od__c = true Result Failed to update records that meet the filter criteria. ________________________________________ Error Occurred: UPDATE --- UPDATE FAILED --- ERRORS : (LIMIT_EXCEEDED) System.LimitException: Too many DML statements: 151 ________________________________________ ________________________________________
Can someone point out the error of my ways?
- Tyler Schryver
- November 03, 2016
- Like
- 0
Problem with passing Account ID to a Flow Interview
I'm having an issue that I'd like another set of eyes to look at. I have a trigger that is invoked after an update on Task. The trigger updates a custom object to which the Tasks are attached, when a Task is completed. The custom object is linked in a M/D relationship to Account. When an Opportunity is Closed as Won, a Process Builder Flow invokes a FLOW interview passing it the Account Id and the Opportunity Id from the Opportunity that invokes the flow. The flow then creates the custom object record. This all works fine.
I'm writting the Test Class for the Trigger and this is where the issue comes up. When I execute a test on the Test Class it fails with error message indicating that it failed to invoke a FLOW. Bottom line is that the FLOW that creates the custom object is failing because the account id being passed to it is null, although the opportunity id has data.
I'm creating the account, several opportunities, and a number of tasks in the test class, and I'm pulling the account id from the account list i've created. Please see the code below, and please let me know why I'm not getting the account id for the account created. Thanks!
I'm writting the Test Class for the Trigger and this is where the issue comes up. When I execute a test on the Test Class it fails with error message indicating that it failed to invoke a FLOW. Bottom line is that the FLOW that creates the custom object is failing because the account id being passed to it is null, although the opportunity id has data.
I'm creating the account, several opportunities, and a number of tasks in the test class, and I'm pulling the account id from the account list i've created. Please see the code below, and please let me know why I'm not getting the account id for the account created. Thanks!
@isTest (seeAllData=false) private class TestONBUpdateFromTask { public static List<Task> tasksList; public static List<Opportunity> opportunitiesList; public static List<Account> accountsList; public static String subject; static void init(){ tasksList = new List<Task>(); opportunitiesList = new List<Opportunity>(); accountsList = new List<Account>(); accountsList.add(new Account(Name = 'Test', Sales_Region__c = '1 - Southeast', Type = 'Prospect' )); opportunitiesList = new List<Opportunity>{ new Opportunity( Name = 'Test1', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Closed Won'), new Opportunity( Name = 'Test2', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Closed Won'), new Opportunity( Name = 'Test3', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Closed Won'), new Opportunity( Name = 'Test4', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Closed Won'), new Opportunity( Name = 'Test5', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, StageName = 'Closed Won') }; } static testMethod void testWithExistingTask() { init(); Test.startTest(); tasksList = new List<Task>{new Task( Subject = subject, Status='Completed' ), new Task(Subject='RealTime Project Kick-Off', Status ='Completed'), new Task(Subject='Confirm OSM Region Added', Status ='Completed'), new Task(Subject='Enable Go-Live', Status='Completed') , new Task(Subject='Finance Confirm Payment Received' , Status = 'Completed'), new Task(Subject='GTFS and Backend Setup' , Status = 'Completed'), new Task(Subject='OnDemand New Product Training' , Status = 'Completed'), new Task(Subject='Schedule Travel', Status = 'Completed')}; insert accountsList; insert opportunitiesList; insert tasksList; tasksList = [ SELECT Id, WhatId FROM Task ]; //if (!tasksList.isEmpty()){ Integer i = 0; for(Task t : tasksList){ t.WhatId = opportunitiesList[i].Id; //i++; } update tasksList; //System.assertEqual(tasksList[0].WhatId, opportunitiesList[0].Id); //Test.stopTest(); } /* static testMethod void testWithoutExistingTask() { init(); Test.startTest(); insert accountsList; accountsList = [ SELECT Id, Name FROM Account WHERE Name = 'Test' ]; insert opportunitiesList; opportunitiesList = [ SELECT Id FROM Opportunity //WHERE AccountName = 'Test' ]; insert tasksList; tasksList = [ SELECT Id, WhatId FROM Task WHERE Id = :tasksList[0].WhatId ]; system.assertEquals(tasksList[0].WhatId, opportunitiesList[0].Id); Test.stopTest(); } */ }
- Tyler Schryver
- October 04, 2016
- Like
- 0
Sites Page View
HI All,
Our company needs to build public facing website using Salesforce Sites. It would be roughly 20 sites in total.
I read some posts mentioning there is a limit of 500,000 page view per month for Enterprise edition (which our company uses). without extra cost
I have some questions regarding this.
1.Can someone please provide me the office SFDC url regarding the page view limit?
2.How the page view is calculated? ie. On a VF page, checkbox A controls the visibility of an outputpanel B. Is it counted as a page view every time the user check or uncheck the checkbox A?
3.I would like to know 500,000 Page view is for all sites or only one site.
Thanks,
David
Our company needs to build public facing website using Salesforce Sites. It would be roughly 20 sites in total.
I read some posts mentioning there is a limit of 500,000 page view per month for Enterprise edition (which our company uses). without extra cost
I have some questions regarding this.
1.Can someone please provide me the office SFDC url regarding the page view limit?
2.How the page view is calculated? ie. On a VF page, checkbox A controls the visibility of an outputpanel B. Is it counted as a page view every time the user check or uncheck the checkbox A?
3.I would like to know 500,000 Page view is for all sites or only one site.
Thanks,
David
- David Zhu 8
- December 08, 2016
- Like
- 1
Error Occurred During Flow "Activity_Update_for_Visual_Workflow":UPDATE --- UPDATE FAILED ---- ERRORS: ...
I have this Trigger:
With this Test Class:
When I run the Test Class I get the following email from a Process Flow that is being executed:
Can someone point out the error of my ways?
trigger OnBoardingUpdateFromTask on Task (after update) { List<Customer_OnBoard__c> OnBoardingsToUpdate = new List<Customer_OnBoard__c>(); Map<Id, Customer_OnBoard__c> OnBoardingIDToOnBoardingObjMap = new Map<Id, Customer_OnBoard__c>(); for (Task t: Trigger.new) { if (t.subject=='AWF: RealTime Project Kick Off' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Project_Kick_Off_rt__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Traveler Project Kick-Off' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Project_Kick_Off_TR__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Update Monthly Billing for Customer' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Monthly_Billing_Update__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Renewal Monthly Billing Update' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Renewal_Monthly_Billing__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission Monthly Billing Update' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Decommission_Monthly_Billing_Update__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission Hardware' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Decommission_Hardware__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission OnDemand Vehicles' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Decommission_Vehicles__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Enable Additional Vehicles' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Enable_Additional_Vehicles__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: OnDemand Project Kick-Off' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Project_Kick_Off_OD__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Order Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Order_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Confirm OSM Region Added' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Confirm_OSM_Added__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Finance Confirm Payment Received' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Finance_Confirm_Payment__c = TRUE; o.Confirm_Payment__c = TRUE; o.Confirm_Payment_Count__c = 1; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Confirm Receipt of SIS' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Confirm_SIS_Received__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: GTFS and Backend Setup' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Create_GTFS_Feed_and_Backend_Setup__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Enable Survey' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Enable_Survey__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Send the SIS to Customer' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Send_the_SIS_to_the_Customer__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: RealTime New Product Training' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.New_Product_Training_rt__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Traveler New Product Training' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.New_Product_Training_TR__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: OnDemand New Product Training' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.New_Product_Training_od__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Preview Period' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Preview_Period__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: RealTime Product Go Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Product_Go_Live_RT__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Traveler Product Go Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Product_Go_Live_TR__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: OnDemand Product Go-Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Product_Go_Live_OD__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Provide Credentials to Agency' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Provide_Credentials_to_Agency__c = TRUE; o.Date_OnDemand_Ready__c = Date.today(); OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Request Logo' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Request_Logo__c = TRUE; o.Date_Traveler_Ready__c = Date.TODAY(); OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Ship Units To Customer' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Ship_Units_To_Customer__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Enable Go-Live' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Weekly_Tasks__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Schedule Travel' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Schedule_Travel__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Check Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Check_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Order Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Order_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Update Inventory' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Update_Inventory__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Submit Expense Form' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Expense_Form__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission Hardware' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.Hardware_Decommissioned__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } if (t.subject=='AWF: Decommission OnDemand Vehicles' && t.Status =='Completed') { if(OnBoardingIDToOnBoardingObjMap.get(t.WhatId) == null){ Customer_OnBoard__c o = new Customer_OnBoard__c(Id=t.WhatId); o.OnDemand_Decommission_Product__c = TRUE; OnBoardingIDToOnBoardingObjMap.put(t.WhatId, o); } } for(Id id : OnBoardingIDToOnBoardingObjMap.keyset()){ Customer_OnBoard__c thisOnb = new Customer_OnBoard__c(); thisOnb = OnBoardingIDToOnBoardingObjMap.get(id); OnBoardingsToUpdate.Add(thisOnb); } try { update OnBoardingsToUpdate; } catch (system.Dmlexception e) { system.debug (e); } } }
With this Test Class:
@isTest (seeAllData=false) private class TestOnBoardingUpdateFromTask { public static List<Task> tasksList; public static List<Opportunity> opportunitiesList; public static List<Account> accountsList; public static String subject; static void init(){ tasksList = new List<Task>(); opportunitiesList = new List<Opportunity>(); accountsList = new List<Account>(); accountsList.add(new Account(Name = 'Test', Sales_Region__c = '1 - Southeast', Type = 'Prospect' )); opportunitiesList = new List<Opportunity>{ new Opportunity( Name = 'Test1', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test2', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test3', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test4', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, Type = 'New Business', TransLoc_Hardware__c = 'Yes', Integration__c = 'NO', StageName = 'Proposal'), new Opportunity( Name = 'Test5', CloseDate = date.today().addDays(5), AccountId = accountsList[0].Id, StageName = 'Proposal') }; } static testMethod void testWithExistingTask() { init(); Test.startTest(); tasksList = new List<Task>{new Task( Subject = subject, Status='Completed', Priority = 'Normal' ), new Task(Subject='AWF: RealTime Project Kick Off', Status ='Completed'), new Task(Subject='AWF: RealTime New Product Training' , Status='Completed'), new Task(Subject='AWF: RealTime Product Go Live' , Status='Completed'), new Task(Subject='AWF: Check Inventory', Status='Completed'), new Task(Subject='AWF: Order Inventory' , Status='Completed'), new Task(Subject='AWF: Start Installation Checklist' , Status='Completed'), new Task(Subject='AWF: Ship Units To Customer' , Status='Completed'), new Task(Subject='AWF: Submit Expense Form' , Status='Completed'), new Task(Subject='AWF: Update Inventory' , Status='Completed'), new Task(Subject='AWFl Schedule Travel', Status = 'Completed'), new Task(Subject='AWF: OnDemand Product Go-Live' , Status='Completed'), new Task(Subject='AWF: OnDemand Project Go Live' , Status='Completed'), new Task(Subject='AWF: OnDemand Project Kick-Off' , Status='Completed'), new Task(Subject='AWF: OnDemand New Product Training' , Status = 'Completed'), new Task(Subject='AWF: Traveler New Product Training' , Status='Completed'), new Task(Subject='AWF: Traveler Product Go Live' , Status='Completed'), new Task(Subject='AWF: Traveler Project Kick-Off' , Status='Completed'), new Task(Subject='AWF: Preview Period' , Status='Completed'), new Task(Subject='AWF: Request Logo' , Status='Completed'), new Task(Subject='AWF: Confirm Receipt of SIS' , Status='Completed'), new Task(subject='AWF: Provide Credentials To Agency' , Status='Completed'), new Task(Subject='AWF: Enable Survey' , Status='Completed'), new Task(Subject='AWF: GTFS and Backend Setup' , Status = 'Completed'), new Task(Subject='AWF: Enable Go-Live', Status='Completed') , new Task(Subject='AWF: Confirm OSM Region Added', Status ='Completed'), new Task(Subject='AWF: Enable Additional Vehicles' , Status = 'Completed'), new Task(Subject='AWF: Decommission OnDemand Vehicles', Status = 'Completed'), new Task(Subject='AWF: Decommission Hardware' , Status = 'Completed'), new Task(Subject='AWF: Finance Confirm Payment Received' , Status = 'Completed'), new Task(Subject='AWF: Decommission Monthly Billing Update' , Status = 'Completed'), new Task(Subject='AWF: Renewal Monthly Billing Update' , Status = 'Completed'), new Task(Subject='AWF: Update Monthly Billing for Customer' , Status = 'Completed') }; insert accountsList; insert opportunitiesList; insert tasksList; tasksList = [ SELECT Id, WhatId FROM Task ]; //if (!tasksList.isEmpty()){ Integer i = 0; for(Task t : tasksList){ t.WhatId = opportunitiesList[i].Id; //i++; } update tasksList; //System.assertEqual(tasksList[0].WhatId, opportunitiesList[0].Id); //Test.stopTest(); } }
When I run the Test Class I get the following email from a Process Flow that is being executed:
An error occurred at element myRule_5_A1 (FlowRecordUpdate). UPDATE --- UPDATE FAILED --- ERRORS : (LIMIT_EXCEEDED) System.LimitException: Too many DML statements: 151 ________________________________________ This report lists the elements that the flow interview executed. The report is a beta feature. We welcome your feedback on IdeaExchange. Flow Details Flow Name: Activity_Updates_for_Visual_Workflow Type: Workflow Version: 14 Status: Active Flow Interview Details Interview Label: Activity_Updates_for_Visual_Workflow-14_Task Current User: Chris Fraser (005d00000066RvV) Start time: 11/3/2016 3:12 PM Duration: 0 seconds How the Interview Started Chris Fraser (005d00000066RvV) started the flow interview. Some of this flow's variables were set when the interview started. myVariable_old = null myVariable_current = 00TP000000FJyvpMAD RecursiveCountVariable = 2.00 ASSIGNMENT: myVariable_waitStartTimeAssignment {!myVariable_waitStartTimeVariable} Equals {!Flow.CurrentDateTime} Result {!myVariable_waitStartTimeVariable} = "11/3/2016 3:12 PM" DECISION: myDecision DECISION: myDecision2 DECISION: myDecision4 Executed this outcome: myRule_5 Outcome conditions: and 1. {!myVariable_current.Subject} (AWF: OnDemand New Product Training) Contains OnDemand New Product Training 2. {!myVariable_current.IsClosed} (true) Equals true Logic: All conditions must be true (AND) RECORD UPDATE: myRule_5_A1 Find all Task records where: Id Equals {!myVariable_current.Id} (00TP000000FJyvpMAD) Update the records’ field values. New_Product_Training_od__c = true Result Failed to update records that meet the filter criteria. ________________________________________ Error Occurred: UPDATE --- UPDATE FAILED --- ERRORS : (LIMIT_EXCEEDED) System.LimitException: Too many DML statements: 151 ________________________________________ ________________________________________
Can someone point out the error of my ways?
- Tyler Schryver
- November 03, 2016
- Like
- 0
Report filter
I have created a report for a custom object. Now I want a user to have access to only specific record type on report. So I added a record type filter. When I run the report with the filter it shows no records but when I have not added any filter it shows all record. Due to security issue I need to give access only on specific record tyep. Please help!
- F Smoak
- October 05, 2016
- Like
- 0
Tools for Salesforce
As i am completely new to salesforce platform can someone guide me with better tools for importing data to salesforce
Thanks
Prakash.
Thanks
Prakash.
- prakash javadekar
- October 04, 2016
- Like
- 0
Having issue with 3 column visualforce page.
I'm having a problem part way through a visualforce page with the alignment of 3 columns. One of the inputfields suddenly gets left out of the page and as a result all remaining fields are shifted by one. For the life of me I can't find what the issue is. Here's the code:
<apex:page id="HardwareChecklist" standardController="Hardware_Checklist__c">
<apex:composition template="{!$Page.accountTemplate}">
<apex:define name="BMHeader">
<apex:sectionHeader title="Hardware Checklist" subtitle="{!Hardware_Checklist__c.Name}"/>
</apex:define>
<apex:define name="BMDetail">
<apex:pageBlock title="Hardware Checklist Detail" mode="mainDetail" >
<apex:pageBlockButtons >
<!--<apex:commandButton action="{!edit}" id="editButton" value="Edit"/>-->
<apex:commandButton action="{!save}" id="saveButton" value="Save" />
<apex:commandButton action="{!delete}" id="deleteButton" value="Delete"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" style="display:none;"/>
</apex:pageBlockButtons>
<!--<apex:pageBlock title="Installation Details" >
<apex:pageBlockSection>-->
<apex:pageBlockSection columns="1">
<apex:outputField value="{!Hardware_Checklist__c.Customer_OnBoard__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Installation_Technician__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Installation_Start_Date__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Installation_End_Date__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Task_Assigned_To_Override__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
</apex:pageBlockSection>
<apex:pageBlock title="Checklist" mode="edit">
<apex:pageBlockSection columns="3">
<apex:outputLabel value="1. Set up devices with site code, firmware, its template, and test for proper operation. Verify with Jon Boyce." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_1__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_1__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="2. Assign SIM cards and phone numbers to each device installed in SalesBinder." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_2__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_2__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="3. Input devices into TransLoc Admin for agency's site or assign to agency's site as spare." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_3__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_3__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="4. Create a label in AirVantage and assign to all devices going onsite." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_4__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_4__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="5. Assign devices from Office to site within SalesBinder." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_5__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_5__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="6. Within TransLoc Manager, create buses by inputting collected bus numbers from visit." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_6__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_6__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="7. Fill out the parts request sheet." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_7__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_7__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="8. Ship all parts and tools once applicable and if approved." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_8__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_8__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="9. Call customer 48 hours in advance to confirm site visit and arrival of shipped parts (if applicable)." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_9__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_9__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="10. Email team at hardware@transloc.com to explain outstanding service issues prior to departure." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_10__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_10__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="11. Assign important JIRA Tickets to Adam Chadwick to triage to rest of team after sending email." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_11__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_11__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="12. Forward office phone to team member staying in office." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_12__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_12__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="13. Using TransLoc Admin (admin.transloc.com), assign device to bus it was installed on." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_13__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_13__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="14.Take photos with technicians and managers on ground for marketing." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_14__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_14__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="15. Take photos with technicians and managers on ground for Growth team for marketing." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_15__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_15__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="16. Email customer with summary of day's events, including buses installed, buses remaining for install, next-day timing concerns, etc.). Please copy Debra Hurst on this email." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_16__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_16__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="17. Email TransLoc Hardware team and Debra Hurst with a summary notes for internal use only (regarding onsite difficulties, etc.)." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_17__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_17__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="18. Fill out parts returned sheet. " style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_18__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_18__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="19. Update SalesBinder to include the devices installed to replace returned spares." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_19__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_19__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="20. Update TransLoc Admin for devices installed to replace returned spares." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_20__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_20__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="21. Update AirVantage site labels." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_21__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_21__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="22. Complete and submit an expense report within Expensify." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_22__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_22__c}" label="Completed">
</apex:inputField>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:pageBlock>
</apex:define>
<apex:define name="BMRelListsBottom">
<apex:relatedList list="OpenActivities"/>
<apex:relatedList list="ActivityHistories"/>
<apex:relatedList list="CombinedAttachments"/>
<apex:relatedList list="ProcessSteps"/>
</apex:define>
</apex:composition>
</apex:page>
Here's the result:
Here's what it should look like:
<apex:page id="HardwareChecklist" standardController="Hardware_Checklist__c">
<apex:composition template="{!$Page.accountTemplate}">
<apex:define name="BMHeader">
<apex:sectionHeader title="Hardware Checklist" subtitle="{!Hardware_Checklist__c.Name}"/>
</apex:define>
<apex:define name="BMDetail">
<apex:pageBlock title="Hardware Checklist Detail" mode="mainDetail" >
<apex:pageBlockButtons >
<!--<apex:commandButton action="{!edit}" id="editButton" value="Edit"/>-->
<apex:commandButton action="{!save}" id="saveButton" value="Save" />
<apex:commandButton action="{!delete}" id="deleteButton" value="Delete"/>
<apex:commandButton onclick="resetInlineEdit()" id="cancelButton" value="Cancel" style="display:none;"/>
</apex:pageBlockButtons>
<!--<apex:pageBlock title="Installation Details" >
<apex:pageBlockSection>-->
<apex:pageBlockSection columns="1">
<apex:outputField value="{!Hardware_Checklist__c.Customer_OnBoard__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Installation_Technician__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Installation_Start_Date__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Installation_End_Date__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
<apex:outputField value="{!Hardware_Checklist__c.Task_Assigned_To_Override__c}">
<apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton, sharingButton, addContact, PricingPortal, standardLayout" event="ondblclick" changedStyleClass="myBoldClass" resetFunction="resetInlineEdit"/>
</apex:outputField>
</apex:pageBlockSection>
<apex:pageBlock title="Checklist" mode="edit">
<apex:pageBlockSection columns="3">
<apex:outputLabel value="1. Set up devices with site code, firmware, its template, and test for proper operation. Verify with Jon Boyce." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_1__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_1__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="2. Assign SIM cards and phone numbers to each device installed in SalesBinder." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_2__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_2__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="3. Input devices into TransLoc Admin for agency's site or assign to agency's site as spare." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_3__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_3__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="4. Create a label in AirVantage and assign to all devices going onsite." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_4__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_4__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="5. Assign devices from Office to site within SalesBinder." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_5__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_5__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="6. Within TransLoc Manager, create buses by inputting collected bus numbers from visit." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_6__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_6__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="7. Fill out the parts request sheet." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_7__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_7__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="8. Ship all parts and tools once applicable and if approved." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_8__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_8__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="9. Call customer 48 hours in advance to confirm site visit and arrival of shipped parts (if applicable)." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_9__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_9__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="10. Email team at hardware@transloc.com to explain outstanding service issues prior to departure." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_10__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_10__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="11. Assign important JIRA Tickets to Adam Chadwick to triage to rest of team after sending email." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_11__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_11__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="12. Forward office phone to team member staying in office." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_12__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_12__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="13. Using TransLoc Admin (admin.transloc.com), assign device to bus it was installed on." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_13__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_13__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="14.Take photos with technicians and managers on ground for marketing." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_14__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_14__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="15. Take photos with technicians and managers on ground for Growth team for marketing." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_15__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_15__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="16. Email customer with summary of day's events, including buses installed, buses remaining for install, next-day timing concerns, etc.). Please copy Debra Hurst on this email." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_16__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_16__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="17. Email TransLoc Hardware team and Debra Hurst with a summary notes for internal use only (regarding onsite difficulties, etc.)." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_17__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_17__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="18. Fill out parts returned sheet. " style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_18__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_18__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="19. Update SalesBinder to include the devices installed to replace returned spares." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_19__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_19__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="20. Update TransLoc Admin for devices installed to replace returned spares." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_20__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_20__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="21. Update AirVantage site labels." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_21__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_21__c}" label="Completed">
</apex:inputField>
<apex:outputLabel value="22. Complete and submit an expense report within Expensify." style="font-weight:800">
</apex:outputLabel>
<apex:inputField value="{!Hardware_Checklist__c.Task_Assigned_To_22__c}" label="Task Assigned To">
</apex:inputField>
<apex:inputField value="{!Hardware_Checklist__c.Completed_22__c}" label="Completed">
</apex:inputField>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:pageBlock>
</apex:define>
<apex:define name="BMRelListsBottom">
<apex:relatedList list="OpenActivities"/>
<apex:relatedList list="ActivityHistories"/>
<apex:relatedList list="CombinedAttachments"/>
<apex:relatedList list="ProcessSteps"/>
</apex:define>
</apex:composition>
</apex:page>
Here's the result:
Here's what it should look like:
- Christopher Fraser 9
- September 16, 2016
- Like
- 0
Adding Search to Site.com Site
I am using Site.com to build a public site that displays content from a custom object. I would like to add a search box to the site.com page that would allow users to perform a text search against the data in the custom object. How would I do this?
- mattclausen
- March 26, 2014
- Like
- 1