Services Estimator API Developer Reference

ffscpq.FinancialSummaryService

global with sharing class FinancialSummaryService

A service that provides functionality related to generating and editing estimate financial summary records.

Methods

generateFinancialSummaries

global static List<ffscpq.FinancialSummaryService.GenerateFinancialSummaryResponse> generateFinancialSummaries(List<ffscpq.FinancialSummaryService.GenerateFinancialSummaryRequest> requests)

A method that generates financial summaries.

Input Parameters

Name Type Description
requests List<ffscpq.FinancialSummaryService.GenerateFinancialSummaryRequest> The list of GenerateFinancialSummaryRequest.

Return Value

This service returns a GenerateFinancialSummaryResponse containing the Async Job Record ID.

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.

// The ID of the estimate that you want to generate the financial summary for.
Id estimateId = 'a6MDK000000L2fJ2AS';

// Construct the request
ffscpq.FinancialSummaryService.GenerateFinancialSummaryRequest request = new ffscpq.FinancialSummaryService.GenerateFinancialSummaryRequest(
    new Set<Id>{ estimateId }
);

List<ffscpq.FinancialSummaryService.GenerateFinancialSummaryResponse> responses = ffscpq.FinancialSummaryService.generateFinancialSummaries(
    new List<ffscpq.FinancialSummaryService.GenerateFinancialSummaryRequest>{ request }
);

// Extract the response data
System.debug('The async job record ID: ' + responses[0].JobId);

// Extract errors
System.debug('Number of errors: ' + responses[0].Errors.size());
if (!responses[0].Errors.isEmpty()) {
    System.debug('Error message: ' + responses[0].Errors[0].Message);
}

startTransaction

global static void startTransaction()

A method that enables editing of estimate financial summary records in the current transaction.

endTransaction

global static void endTransaction()

A method that disables editing of estimate financial summary records after they have been enabled.

ffscpq.FinancialSummaryService.GenerateFinancialSummaryRequest

global with sharing class GenerateFinancialSummaryRequest

The request structure for generating financial summaries.

Properties

Name Type Description
EstimateIds Set<Id> The IDs of the estimates required to generate financial summaries.

Methods

GenerateFinancialSummaryRequest

global GenerateFinancialSummaryRequest(Set<Id> estimateIds)

A default constructor with minimum required properties.

Input Parameters

Name Type Description
estimateIds Set<Id> The IDs of the estimates.

ffscpq.FinancialSummaryService.GenerateFinancialSummaryResponse

global with sharing class GenerateFinancialSummaryResponse

The result returned after generation of financial summaries has started.

Properties

Name Type Description
JobId Id The Async Job Record ID. If this is null, the request was not processed due to an error.
Errors List<ffscpq.FinancialSummaryService.GenerateFinancialSummaryError> A list containing errors that occurred while processing the request.

ffscpq.FinancialSummaryService.GenerateFinancialSummaryError

global with sharing class GenerateFinancialSummaryError

The error that occurred while processing the request.

Properties

Name Type Description
Message String The error message.
© Copyright 2009–2025 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.