ffrr.RevenueScheduleAutomationServiceglobal with sharing class RevenueScheduleAutomationService Contains methods for Revenue Schedule automation. EnumsAutomationProcessDenotes an individual process that can be run by the automation service. The order these are listed here is the same order in which the processes will be run, if selected.
MethodsrunProcessesglobal static ffrr.RevenueScheduleAutomationService.AutomationResult runProcesses(ffrr.RevenueScheduleAutomationService.AutomationConfig configuration) Runs the revenue schedule processes specified by the ffrr.RevenueScheduleAutomationService.AutomationConfig object from the first process to last process. See the RevenueScheduleAutomationService.AutomationProcess enum for the available values. The order in which these processes happens is as follows: Input Parameters
Exceptions Thrown
Return ValueReturns a ffrr.RS_AutomationService.AutomationResult object. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. // example 1 // In this example the automation service has been asked to run from Generate to CreateJournals including summarizing the transactions. // The processes will be chained from one to the other including the steps in between eg. Generate, Recognize, Summarize, CreateJournals ffrr.RevenueScheduleAutomationService.AutomationProcess firstProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.Generate; ffrr.RevenueScheduleAutomationService.AutomationProcess lastProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.CreateJournals; ffrr.RevenueScheduleAutomationService.AutomationConfig config = new ffrr.RevenueScheduleAutomationService.AutomationConfig(firstProcess, lastProcess); // call the run processes method to chain the configured processes together and set the first one running. ffrr.RevenueScheduleAutomationService.AutomationResult result = ffrr.RevenueScheduleAutomationService.runProcesses(config); // example 2 // In this example the automation service is being used to run only a single process Generate. ffrr.RevenueScheduleAutomationService.AutomationProcess firstProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.Generate; ffrr.RevenueScheduleAutomationService.AutomationProcess lastProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.Generate; ffrr.RevenueScheduleAutomationService.AutomationConfig config = new ffrr.RevenueScheduleAutomationService.AutomationConfig(firstProcess, lastProcess); // call the run processes method to chain the configured processes together and set the first one running. ffrr.RevenueScheduleAutomationService.AutomationResult result = ffrr.RevenueScheduleAutomationService.runProcesses(config); // example 3 // In this example only the Recognize and CreateJournals method will be called (creating journals from revenue recognition lines) ffrr.RevenueScheduleAutomationService.AutomationProcess firstProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.Recognize; ffrr.RevenueScheduleAutomationService.AutomationProcess lastProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.CreateJournals; Boolean summarizeTransactions = false; ffrr.RevenueScheduleAutomationService.AutomationConfig config = new ffrr.RevenueScheduleAutomationService.AutomationConfig(firstProcess, lastProcess, summarizeTransactions); // call the run processes method to chain the configured processes together and set the first one running. ffrr.RevenueScheduleAutomationService.AutomationResult result = ffrr.RevenueScheduleAutomationService.runProcesses(config); ffrr.RevenueScheduleAutomationService.AutomationConfigglobal with sharing class AutomationConfig Class used to pass configuration to automation API call. Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. //Configure which processes should be run, starting from firstProcess, following the order of processes in the AutomationProcess enum until lastProcess is reached (inclusive) //In this example, Generate, Recognize and Summarize will be run in that order. ffrr.RevenueScheduleAutomationService.AutomationProcess firstProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.Generate; ffrr.RevenueScheduleAutomationService.AutomationProcess lastProcess = ffrr.RevenueScheduleAutomationService.AutomationProcess.Summarize; //Set if transactions should be summarized when Summarize is included in the processes to run. //Additionally, if the CreateJournals process is included in the processes to run, sets if journals should be created from transaction summaries (if true) or from transaction lines (if false). Boolean summarizeTransactions = true; ffrr.RevenueScheduleAutomationService.AutomationConfig config = new ffrr.RevenueScheduleAutomationService.AutomationConfig(firstProcess, lastProcess, summarizeTransactions); //Indicates if the email notifications should be sent after each individual process has completed config.shouldSendEmailAtEndOfProcesses = false; Properties
Methods
AutomationConfigglobal AutomationConfig(ffrr.RevenueScheduleAutomationService.AutomationProcess firstProcess, ffrr.RevenueScheduleAutomationService.AutomationProcess lastProcess) AutomationConfigglobal AutomationConfig(ffrr.RevenueScheduleAutomationService.AutomationProcess firstProcess, ffrr.RevenueScheduleAutomationService.AutomationProcess lastProcess, Boolean summarizeTransactions) ffrr.RevenueScheduleAutomationService.AutomationResultglobal with sharing class AutomationResult Class used to return results of automation API call. |