Starting Multliple MergeUp BatchesLearn how to start multiple MergeUp Batches at the same time manually, using a Flow or using Apex.Jan 20, 2025Knowledge
InformationArticle BodyPrerequisites Create the MergeUp Batch records that you want to start, whether manually, by a Flow, or by Apex (To learn how to create a MergeUp Batch by any of these methods, see Generating Multiple Documents Based on a Report, Generating Multiple Documents Using Flows, or Generating Multiple Documents Using Apex). Overview Once a MergeUp Batch is created, it must be run in order to merge documents and upload them to records. These steps will walk you through starting a multliple MergeUp Batches using any of three methods: manually, by Flow, or by Apex. Steps Manually Navigate to the MergeUp Batch tab in the MergeUp Manager. Use one of the existing list views or create a custom one in order to view all the batches you want to start. For example you could create a custom list view to see only MergeUp Batches that are not started. If you create a custom list view, be sure to include the Status field. On the MergeUp Batches you want to start, edit the Status field and change it to "Started". When you are ready, click Save. Done! Your MergeUp Batches have started. Notes The benefit of this method is that you can easily select any MergeUp Batches you want to start without much setup or filtering by specific criteria. Flow Create a Flow of whatever type you want, and configure its start conditions (if applicable). Add a Get Records element, and set it to get MergeUp Batch records by the criteria you want to use. For this example we will get all the MergeUp Batches that have not been started. Be sure to select "All Records" for "How Many Records to Store". Add a Loop element to go through each MergeUp Batch For each MergeUp Batch in the loop, use an Assignment element to set its Status field to "Started". Lastly, add an Update Records element after the loop to update the MergeUp Batch records. Done! When the Flow is run, the MergeUp Batches that are collected in the Get Records element will be started. Notes This method is a useful way of running MergeUp Batches that meet certian criteria in a repeatable way.Instead of a simple Get Records element, you could use your own logic to select the records to update, such as a datatable on a Screen element. Apex To start multiple batches from Apex, simply update the Status field to "Started", and run a DML update. List<mergeup__MergeUp_Batch__c> batches = new List<mergeup__MergeUp_Batch__c>(); for (mergeup__MergeUp_Batch__c batch : [ SELECT Id FROM mergeup__MergeUp_Batch__c WHERE mergeup__Status__c = 'Not Started' ]) { batch.mergeup__Status__c = 'Started'; batches.add(batch); } update batches; Notes One good application of this way of starting MergeUp Batches would be to call this method from a custom LWC that allows users to select which batches to start. Next Steps Learn how to schedule a MergeUp Batch for later Scheduling a MergeUp Batch to Start Later Learn how to monitor your MergeUp Batch(es): Monitor a MergeUp BatchMonitor the MergeUp Batch Apex Job TitleStarting Multliple MergeUp BatchesURL NameStarting-Multliple-MergeUp-Batches