Services Estimator API Developer Reference

ffscpq.CloneEstimateService

global with sharing class CloneEstimateService

A service that provides functionality to clone estimates.

Methods

cloneEstimateAsync

global static ffscpq.CloneEstimateService.CloneEstimateResponse cloneEstimateAsync(ffscpq.CloneEstimateService.CloneEstimateRequest request)

A method that clones an estimate asynchronously.

Input Parameters

Name Type Description
request ffscpq.CloneEstimateService.CloneEstimateRequest The CloneEstimateRequest.

Return Value

This service returns a CloneEstimateResponse.

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//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 clone.
Id sourceEstimateId = 'a52DK000006LEDfYAO';
 
// Construct the request
ffscpq.CloneEstimateService.CloneEstimateRequest request = new ffscpq.CloneEstimateService.CloneEstimateRequest(
    sourceEstimateId
);
 
// You can optionally set a name for the cloned estimate.
request.Name = 'New estimate';
 
// You can optionally set an opportunity for the cloned estimate.
request.OpportunityId = '006DK00000E8LNfYAN';
 
ffscpq.CloneEstimateService.CloneEstimateResponse response = ffscpq.CloneEstimateService.cloneEstimateAsync(
    request
);
 
// Extract the response data
System.debug('Source estimate Id: ' + response.SourceEstimateId);
System.debug('Created estimate Id: ' + response.EstimateId);
System.debug('Async apex job Id: ' + response.JobId);

ffscpq.CloneEstimateService.CloneEstimateRequest

global with sharing class CloneEstimateRequest

The request structure for cloning estimates.

Properties

Name Type Description
SourceEstimateId Id The Id of the Estimate that will be cloned.
Name String [Optional] The name of the cloned estimate. If left blank the name will be copied from the source estimate.
OpportunityId String [Optional] The opportunity associated with the new estimate. This opportunity must be of the same currency as the source estimate. If the source estimate is a template this must not be populated. If left blank the opportunity will be copied from the source estimate.

Methods

CloneEstimateRequest

global CloneEstimateRequest(Id sourceEstimateId)

Input Parameters

Name Type Description
sourceEstimateId Id An Id of an Estimate that will be cloned.

ffscpq.CloneEstimateService.CloneEstimateResponse

global with sharing class CloneEstimateResponse

The result returned after cloning an estimate.

Properties

Name Type Description
SourceEstimateId Id The Id of the estimate that has been cloned.
EstimateId Id The Id of the cloned estimate.
JobId Id The Id of the clone estimate async apex job.

Methods

CloneEstimateResponse

global CloneEstimateResponse(Id sourceEstimateId, Id estimateId, Id jobId)

ffscpq.CloneEstimateService.CloneEstimateValidationException

global with sharing class CloneEstimateValidationException extends Exception

The error that occurred while validating the request.

© Copyright 2009–2025 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.