Services Estimator API Developer Reference

ffscpq.GenerateEstimateMilestonesService

global with sharing class GenerateEstimateMilestonesService

A service that provides functionality related to generating Estimate Milestone records.

Methods

generateEstimateMilestonesAsync

global static List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponse> generateEstimateMilestonesAsync(List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest> requests)

A method that generates estimate milestones asynchronously.

Input Parameters

Name Type Description
requests List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest> The list of GenerateEstimateMilestonesRequests.

Return Value

This service returns a GenerateEstimateMilestonesResponse 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.

// A list of estimate IDs that milestones will be generated for.
Set<Id> estimateIds = new Set<Id>{ 'a6321000000XmT0AaC' };

// Construct the request.
ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest request = new ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest();
request.EstimateIds = estimateIds;

// Call the global service to generate estimate milestones asynchronously.
List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponse> responses = ffscpq.GenerateEstimateMilestonesService.generateEstimateMilestonesAsync(
    new List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest>{ request }
);

// Extract the Async Job Record ID from the response.
System.debug('Async Job Record ID: ' + responses[0].JobId);

// Extract errors
if (!responses[0].Errors.isEmpty()) {
    for (
        ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesError error : responses[0]
            .Errors
    ) {
        System.debug('Error: ' + error.Message);
    }
}

generateEstimateMilestones

global static List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponse> generateEstimateMilestones(List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest> requests)

A method that generates estimate milestones.

Input Parameters

Name Type Description
requests List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest> The list of GenerateEstimateMilestonesRequests.

Return Value

This service returns a GenerateEstimateResponse.

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.

// A list of estimate IDs that milestones will be generated for.
Set<Id> estimateIds = new Set<Id>{ 'a6321000000XmT0AaC' };

// Construct the request.
ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest request = new ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest();
request.EstimateIds = estimateIds;

// Call the global service to generate estimate milestones synchronously.
List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponse> responses = ffscpq.GenerateEstimateMilestonesService.generateEstimateMilestones(
    new List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest>{ request }
);

// Extract errors
if (!responses[0].Errors.isEmpty()) {
    for (
        ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesError error : responses[0]
            .Errors
    ) {
        System.debug('Error: ' + error.Message);
    }
}

ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest

global with sharing class GenerateEstimateMilestonesRequest

The request structure for generating estimate milestones.

Properties

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

ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponse

global with sharing class GenerateEstimateMilestonesResponse

The result returned after generation of estimate milestones has started.

Properties

Name Type Description
JobId Id The Async Job Record ID.
Errors List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesError> A list containing errors that occurred while processing the request.

ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesError

global with sharing class GenerateEstimateMilestonesError

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.