ffscpq.CreateScopingSessionServiceglobal with sharing class CreateScopingSessionService A service that provides functionality related to creating scoping sessions. MethodscreateScopingSessionglobal static ffscpq.CreateScopingSessionService.CreateScopingSessionResponse createScopingSession(ffscpq.CreateScopingSessionService.CreateScopingSessionRequest request) A method that creates a scoping session. Input Parameters
Return ValueThis service returns a CreateScopingSessionResponse. 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.
// Add opportunity ID to populate lookup on the created scoping session.
Id opportunityId = '006DR00000KhTNYYA3';
// Build request
CreateScopingSessionService.CreateScopingSessionRequest request = new CreateScopingSessionService.CreateScopingSessionRequest(
opportunityId
);
// Optionally add a list of estimate product IDs to add to the created scoping session.
request.EstimateProductIds = new List<Id>{ 'a5FDR000001Qpxt2AC' };
// Optionally add a name to the created scoping session.
request.Name = 'Scoping Session created using global service';
// Call the global service with the previously created request list.
CreateScopingSessionService.CreateScopingSessionResponse response = CreateScopingSessionService.createScopingSession(
request
);
// Extract the response data.
System.debug('Created Scoping session ID: ' + response.ScopingSession);
System.debug(
'Created Scoping Session Estimate Product IDs: ' + response.ScopingSessionEstimateProductIds
);
ffscpq.CreateScopingSessionService.CreateScopingSessionRequestglobal with sharing class CreateScopingSessionRequest The request structure for creating a scoping session. Properties
MethodsCreateScopingSessionRequestglobal CreateScopingSessionRequest(Id opportunityId) ffscpq.CreateScopingSessionService.CreateScopingSessionResponseglobal with sharing class CreateScopingSessionResponse The response structure for creating a scoping session. Properties
MethodsCreateScopingSessionResponseglobal CreateScopingSessionResponse(Id scopingSessionId, List<Id> ScopingSessionEstimateProductIds) |