ffscpq.CloneEstimateServiceglobal with sharing class CloneEstimateService A service that provides functionality to clone estimates. MethodscloneEstimateAsyncglobal static ffscpq.CloneEstimateService.CloneEstimateResponse cloneEstimateAsync(ffscpq.CloneEstimateService.CloneEstimateRequest request) A method that clones an estimate asynchronously. Input Parameters
Return ValueThis service returns a CloneEstimateResponse. 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 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.CloneEstimateRequestglobal with sharing class CloneEstimateRequest The request structure for cloning estimates. Properties
MethodsCloneEstimateRequestglobal CloneEstimateRequest(Id sourceEstimateId) Input Parameters
ffscpq.CloneEstimateService.CloneEstimateResponseglobal with sharing class CloneEstimateResponse The result returned after cloning an estimate. Properties
MethodsCloneEstimateResponseglobal CloneEstimateResponse(Id sourceEstimateId, Id estimateId, Id jobId) ffscpq.CloneEstimateService.CloneEstimateValidationExceptionglobal with sharing class CloneEstimateValidationException extends Exception The error that occurred while validating the request. |