ffscpq.AddEstProductToScopingSessionServiceglobal with sharing class AddEstProductToScopingSessionService A service that provides functionality related to adding estimate products to a scoping session. MaxDependencyCount(32) Methods
addEstimateProductsToScopingSessionglobal static ffscpq.AddEstProductToScopingSessionService.AddEstimateProductResponse addEstimateProductsToScopingSession(ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequest request) A method that adds estimate products to an existing scoping session. Input Parameters
Return ValueThis service returns an AddEstimateProductResponse. 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 scoping session to add estimate products to.
Id ScopingSessionId = 'a5WDO000000WkgT2AS';
// The list of estimate product IDs to add to the scoping session.
List<Id> EstimateProductIds = new List<Id>{ 'a5FDO0000008REQ2A2', 'a5FDO0000008REP2A2' };
// Construct the request.
ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequest request = new ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequest(
ScopingSessionId,
EstimateProductIds
);
// Call the global service with the request.
ffscpq.AddEstProductToScopingSessionService.AddEstimateProductResponse response = ffscpq.AddEstProductToScopingSessionService.addEstimateProductsToScopingSession(
request
);
addEstimateProductsToScopingSessionsglobal static List<ffscpq.AddEstProductToScopingSessionService.AddEstimateProductResponse> addEstimateProductsToScopingSessions(List<ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequest> requests) A method that adds estimate products to multiple existing scoping sessions. Input Parameters
Return ValueThis service returns a list of AddEstimateProductResponse. 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 scoping session IDs to add estimate products to.
List<Id> scopingSessionIds = new List<Id>{ 'a5WDO000000WkgT2AS', 'a5WDO000000WkgU2AS' };
// The list of estimate product IDs to add to each scoping session.
List<Id> estimateProductIds = new List<Id>{ 'a5FDO0000008REQ2A2', 'a5FDO0000008REP2A2' };
// Build requests for each scoping session.
List<ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequest> requests = new List<ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequest>();
for (Id scopingSessionId : scopingSessionIds) {
requests.add(
new ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequest(
scopingSessionId,
estimateProductIds
)
);
}
// Call the global service with the request list.
List<ffscpq.AddEstProductToScopingSessionService.AddEstimateProductResponse> responses = ffscpq.AddEstProductToScopingSessionService.addEstimateProductsToScopingSessions(
requests
);
// Extract the IDs of the estimate products added to each scoping session.
for (ffscpq.AddEstProductToScopingSessionService.AddEstimateProductResponse response : responses) {
System.debug(
'Scoping Session Estimate Product IDs: ' + response.scopingSessionEstimateProductIds
);
}
ffscpq.AddEstProductToScopingSessionService.AddEstimateProductRequestglobal with sharing class AddEstimateProductRequest The request structure for adding estimate products to a scoping session. Properties
MethodsAddEstimateProductRequestglobal AddEstimateProductRequest(Id scopingSessionId, List<Id> estimateProductIds) ffscpq.AddEstProductToScopingSessionService.AddEstimateProductResponseglobal with sharing class AddEstimateProductResponse The result returned after adding estimate products to a scoping session. Properties
|