ffscpq.GenerateEstimateMilestonesServiceglobal with sharing class GenerateEstimateMilestonesService A service that provides functionality related to generating Estimate Milestone records. Methods
generateEstimateMilestonesAsyncglobal static List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponse> generateEstimateMilestonesAsync(List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest> requests) A method that generates estimate milestones asynchronously. Input Parameters
Return ValueThis 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);
}
}
generateEstimateMilestonesglobal static List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponse> generateEstimateMilestones(List<ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesRequest> requests) A method that generates estimate milestones. Input Parameters
Return ValueThis 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.GenerateEstimateMilestonesRequestglobal with sharing class GenerateEstimateMilestonesRequest The request structure for generating estimate milestones. Properties
ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesResponseglobal with sharing class GenerateEstimateMilestonesResponse The result returned after generation of estimate milestones has started. Properties
ffscpq.GenerateEstimateMilestonesService.GenerateEstimateMilestonesErrorglobal with sharing class GenerateEstimateMilestonesError The error that occurred while processing the request. Properties
|