Advanced Apex Programming for Salesforce.com and Force.com by Dan Appleman
Author:Dan Appleman [Appleman, Dan]
Language: eng
Format: epub
ISBN: 9781936754113
Publisher: Desaware Publishing
Published: 2015-08-30T22:00:00+00:00
In the SolutionTrigger1 trigger, which is an after-insert, after-update trigger, add the following (commenting out the previous handleTrigger1 call):
GoingAsync1.handleTrigger5(trigger.new, trigger.newMap, trigger.oldMap, trigger.isInsert);
In the GoingAsync1 class, create the HandleTrigger5 function, which is very similar to the original HandleTrigger1 function.
public static void handleTrigger5(List<Solution> solutionList, Map<ID, Solution> newMap, Map<ID, Solution> oldMap, Boolean isInsert) { if(alreadyProcessed) return; alreadyProcessed = true; List<AsyncRequest__c> newAsyncRequests = new List<AsyncRequest__c>(); List<String> textChangedIds = new List<ID>(); for(Solution sl: solutionList) { if(isInsert || sl.SolutionNote!= oldMap.get(sl.id).SolutionNote) textChangedIds.add(sl.id); if(textChangedIds.size()>100) { newAsyncRequests.add( new AsyncRequest__c( AsyncType__c = 'Translate Solution', Params__c = string.Join(textChangedIds,','))); textChangedIds.clear(); } } if(textChangedIds.size()>0) newAsyncRequests.add( new AsyncRequest__c( AsyncType__c = 'Translate Solution', Params__c = string.Join(textChangedIds,','))); insert newAsyncRequests; }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(7272)
Supercharging Productivity with Trello by Brittany Joiner(6531)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Mastering Tableau 2023 - Fourth Edition by Marleen Meier(6296)
Inkscape by Example by István Szép(6148)
Visualize Complex Processes with Microsoft Visio by David J Parker & Šenaj Lelić(5846)
Build Stunning Real-time VFX with Unreal Engine 5 by Hrishikesh Andurlekar(4833)
Design Made Easy with Inkscape by Christopher Rogers(4557)
Customizing Microsoft Teams by Gopi Kondameda(4102)
Linux Device Driver Development Cookbook by Rodolfo Giometti(3932)
Extending Microsoft Power Apps with Power Apps Component Framework by Danish Naglekar(3691)
Business Intelligence Career Master Plan by Eduardo Chavez & Danny Moncada(3625)
Salesforce Platform Enterprise Architecture - Fourth Edition by Andrew Fawcett(3565)
Pandas Cookbook by Theodore Petrou(3545)
The Tableau Workshop by Sumit Gupta Sylvester Pinto Shweta Sankhe-Savale JC Gillet and Kenneth Michael Cherven(3347)
TCP IP by Todd Lammle(2982)
Drawing Shortcuts: Developing Quick Drawing Skills Using Today's Technology by Leggitt Jim(2910)
Applied Predictive Modeling by Max Kuhn & Kjell Johnson(2857)
Work Smarter with Microsoft OneNote by Connie Clark(2840)
