ffrr.RRTCreateJournalsServiceglobal with sharing class RRTCreateJournalsService Methods
createRRTToJournalAsyncglobal static Set<Id> createRRTToJournalAsync(ffrr.RRTCreateJournalsService.CreateJournalRequest integrationRequest) This method creates accounting journals for specified recognition transactions. Information is passed between Revenue Management and Accounting via Foundations using the Journal.Create message type. NOTE: Journal lines can be created from recognition transaction lines or from recognition transaction summaries depending on the createJournalUsingSummaries boolean parameter passed into the integrationRequest. Input Parameters
Return ValueThis method returns the IDs of the batch jobs that will create the accounting journal. 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. You need to provide some sample code validateRevenueRecognitionTransactionsglobal static Map<Id, String> validateRevenueRecognitionTransactions(ffrr.RRTCreateJournalsService.CreateJournalRequest integrationRequest) This method validates recognition transactions and either their transaction line items or their recognition transaction summaries for accounting journal creation. To validate a recognition transaction with recognition transaction summaries, please call an appropriate constructor of integrationRequest. Return any invalid recognition transactions in a map with the relevant error message. Journals can only be created for recognition transactions that have the status Committed, a valid Grouped By value, and that do not already have lookup to an accounting journal. To create journals using summary records, recognition transactions must also have recognition transaction summaries. Input Parameters
Return ValueThis method returns a map containing the IDs of invalid recognition transactions with their validation error messages. If all the recognition transactions are valid, this method returns an empty map. 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. You need to provide some sample code createRRTToJournalglobal static Map<Id, ffrr.RRTCreateJournalsService.CreateJournalResponse> createRRTToJournal(ffrr.RRTCreateJournalsService.CreateJournalRequest integrationRequest) This method creates accounting journals for specified recognition transactions synchronously. Information is passed between Revenue Management and Accounting via Foundations using the Journal.Create message type. Input Parameters
Return ValueThis method returns a map containing the IDs of recognition transactions with information about the revenue and cost journals that you attempted to create and whether or not they were created successfully. 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. You need to provide some sample code ffrr.RRTCreateJournalsService.CreateJournalRequestglobal with sharing class CreateJournalRequest Class containing information regarding RT to Journal creation. Properties
Methods
CreateJournalRequestglobal CreateJournalRequest(Set<Id> revenueRecognitionIds) 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. //IDs of Recognition Transactions that Accounting Journals will be created for. In order to be eligible for journal creation, //the records associated with these IDs must have a Status of Committed, a GroupBy field which contains an Accounting usercompany value, //and the Journal field must be empty. Set<Id> revenueRecognitionIds = new Set<Id>{'a1ga00000111sg1', 'a1ga00000111sg2'}; //Create the CreateJournalRequest for Journal creation using Recognition Transactions and its line items ffrr.RRTCreateJournalsService.CreateJournalRequest request = new ffrr.RRTCreateJournalsService.CreateJournalRequest(revenueRecognitionIds); CreateJournalRequestglobal CreateJournalRequest(Set<Id> revenueRecognitionIds, Boolean shouldCreateJournalFromSummary) 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. //IDs of Recognition Transactions that Accounting Journals will be created for. In order to be eligible for journal creation, //the records associated with these IDs must have a Status of Committed, a GroupBy field which contains an Accounting usercompany value, //the Journal field must be empty, and summary records must exist. Set<Id> revenueRecognitionIds = new Set<Id>{'a1ga00000111sg1', 'a1ga00000111sg2'}; //Determines whether journal lines are created from recognition transaction lines or revenue transaction summaries. Boolean shouldCreateJournalFromSummary = true; //Create the CreateJournalRequest for Journal creation using Recognition Transactions and its summary records //Boolean property shouldCreateJournalFromSummary with true value should be passed only if journal need to be created using Recognition Transactions and its summary records ffrr.RRTCreateJournalsService.CreateJournalRequest request = new ffrr.RRTCreateJournalsService.CreateJournalRequest(revenueRecognitionIds, shouldCreateJournalFromSummary); ffrr.RRTCreateJournalsService.CreateJournalResponseglobal with sharing class CreateJournalResponse Class containing the response for the RT to Journal creation process. Properties
MethodsCreateJournalResponseglobal CreateJournalResponse() |