Services Estimator – Salesforce RLM Connector API Developer Reference

serlm.SyncEstimateAndQuoteService

global with sharing class SyncEstimateAndQuoteService

A service that provides functionality related to adding details from estimates to their related quotes.

Methods

syncEstimateAndQuote

global static List<serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteResponse> syncEstimateAndQuote(List<serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest> requests)

A method that adds estimate details to their related quotes.

Input Parameters

Name Type Description
requests List<serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest> The list of SyncEstimateAndQuoteRequest objects.

Return Value

This service returns SyncEstimateAndQuoteResponse in a list that parallels the input list.

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 primary estimate that contains the details you want to add to the related quote.
Id estimateId = 'a6MDK000000L2fJ2AS';

// Construct the request
serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest request = new serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest(estimateId);

List<serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteResponse> responses = serlm.SyncEstimateAndQuoteService.syncEstimateAndQuote(
    new List<serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest>{ request }
);

// Extract the response data
System.debug('The estimate ID: ' + responses[0].EstimateId);

// 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);
}

serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest

global with sharing class SyncEstimateAndQuoteRequest

The request structure for adding an estimate to its related quote.

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 primary estimate that contains the details you want to add to the related quote.
Id estimateId = 'a6MDK000000L2fJ2AS';

// Construct the request
serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest request = new serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteRequest(estimateId);

Properties

Name Type Description
EstimateId Id The ID of the estimate to add to the related quote.

Methods

SyncEstimateAndQuoteRequest

global SyncEstimateAndQuoteRequest(Id estimateId)

A default constructor with minimum required properties.

Input Parameters

Name Type Description
estimateId Id The estimate ID.

serlm.SyncEstimateAndQuoteService.SyncEstimateAndQuoteResponse

global with sharing class SyncEstimateAndQuoteResponse

The response structure for adding an estimate to its related quote.

Properties

Name Type Description
Errors List<SyncEstimateAndQuoteError> A list containing errors that occurred while processing the request.
EstimateId Id The ID of the estimate specified in the request.
© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.