ffscpq.EstimateCalculationServiceglobal with sharing class EstimateCalculationService A service that provides functionality related to calculating net amounts for estimate product instances. Methods
getTotalForEachEstimateLineSetglobal static List<ffscpq.EstimateCalculationService.CalculateEstimateLineSetResponse> getTotalForEachEstimateLineSet(List<ffscpq.EstimateCalculationService.CalculateEstimateLineSetRequest> requests) A method that calculates the total net amount of a line set. Input Parameters
Return ValueThis service returns CalculateEstimateLineSetResponse 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 lineset that you want to calculate the total for. A request is required for each lineset you want to calculate the total for.
Id lineSetId = 'a6321000000DmM0AaC';
// Construct the request
ffscpq.EstimateCalculationService.CalculateEstimateLineSetRequest request = new ffscpq.EstimateCalculationService.CalculateEstimateLineSetRequest(
lineSetId
);
List<ffscpq.EstimateCalculationService.CalculateEstimateLineSetResponse> responses = ffscpq.EstimateCalculationService.getTotalForEachEstimateLineSet(
new List<ffscpq.EstimateCalculationService.CalculateEstimateLineSetRequest>{ request }
);
// Extract the total
System.debug('Total for line set a6321000000DmM0AaC: ' + responses[0].SummedNetAmount);
getTotalForEachEstimateTaskglobal static List<ffscpq.EstimateCalculationService.CalculateEstimateTaskResponse> getTotalForEachEstimateTask(List<ffscpq.EstimateCalculationService.CalculateEstimateTaskRequest> requests) A method that calculates the total net amount of a task. Input Parameters
Return ValueThis service returns CalculateEstimateTaskResponse 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 task that you want to calculate the total of. A request is required for each task you want to calculate the total of.
Id taskId = 'a6321000000XmT0AaC';
// Construct the request
ffscpq.EstimateCalculationService.CalculateEstimateTaskRequest request = new ffscpq.EstimateCalculationService.CalculateEstimateTaskRequest(
taskId
);
List<ffscpq.EstimateCalculationService.CalculateEstimateTaskResponse> responses = ffscpq.EstimateCalculationService.getTotalForEachEstimateTask(
new List<ffscpq.EstimateCalculationService.CalculateEstimateTaskRequest>{ request }
);
// Extract the total
System.debug('Total for task a6321000000XmT0AaC: ' + responses[0].SummedNetAmount);
// Extract errors
System.debug('Number of errors: ' + responses[0].Errors.size());
getTotalForEachEstimateRoleRequestglobal static List<ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestResponse> getTotalForEachEstimateRoleRequest(List<ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestRequest> requests) A method that calculates the total net amount of a role request. Input Parameters
Return ValueThis service returns CalculateEstimateRoleRequestResponse 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 role request that you want to calculate the total of. A request is required for each role request you want to calculate the total of.
Id roleRequestId = 'a6321000000XmT0AaC';
// Construct the request
ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestRequest request = new ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestRequest(
roleRequestId
);
List<ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestResponse> responses = ffscpq.EstimateCalculationService.getTotalForEachEstimateRoleRequest(
new List<ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestRequest>{ request }
);
// Extract the total
System.debug('Total for role request a6321000000XmT0AaC: ' + responses[0].SummedNetAmount);
// Extract errors
System.debug('Number of errors: ' + responses[0].Errors.size());
getTotalForEachEstimateProductInstanceglobal static List<ffscpq.EstimateCalculationService.CalculateEstimateProductResponse> getTotalForEachEstimateProductInstance(Set<Id> estimateIds) A method that calculates the total net amount for each product estimate instance related to the given estimate Ids. Input Parameters
Return ValueThis service returns CalculateEstimateProductResponse in a list that parallels the input list. ffscpq.EstimateCalculationService.CalculateEstimateLineSetRequestglobal with sharing class CalculateEstimateLineSetRequest The request structure for calculating the net amount of a line set. Properties
MethodsCalculateEstimateLineSetRequestglobal CalculateEstimateLineSetRequest(Id lineSetId) A default constructor with minimum required properties. Input Parameters
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 line set that you want to calculate the total of. A request is required for each line set you want to calculate the total of.
Id lineSetId = 'a6321000000DmM0AaC';
// Construct the request
ffscpq.EstimateCalculationService.CalculateEstimateLineSetRequest request = new ffscpq.EstimateCalculationService.CalculateEstimateLineSetRequest(
lineSetId
);
ffscpq.EstimateCalculationService.CalculateEstimateLineSetResponseglobal with sharing class CalculateEstimateLineSetResponse The result returned after calculating the net amount of a line set. Properties
ffscpq.EstimateCalculationService.CalculateEstimateTaskRequestglobal with sharing class CalculateEstimateTaskRequest The request structure for calculating the net amount of a task. Properties
MethodsCalculateEstimateTaskRequestglobal CalculateEstimateTaskRequest(Id taskId) A default constructor with minimum required properties. Input Parameters
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 task that you want to calculate the total of. A request is required for each task you want to calculate the total of.
Id taskId = 'a6321000000XmT0AaC';
// Construct the request
ffscpq.EstimateCalculationService.CalculateEstimateTaskRequest request = new ffscpq.EstimateCalculationService.CalculateEstimateTaskRequest(
taskId
);
ffscpq.EstimateCalculationService.CalculateEstimateTaskResponseglobal with sharing class CalculateEstimateTaskResponse The result returned after calculating the net amount of a task. Properties
ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestRequestglobal with sharing class CalculateEstimateRoleRequestRequest The request structure for calculating the net amount of a role request. Properties
MethodsCalculateEstimateRoleRequestRequestglobal CalculateEstimateRoleRequestRequest(Id roleRequestId) A default constructor with minimum required properties. Input Parameters
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 role request that you want to calculate the total of. A request is required for each role request you want to calculate the total of.
Id roleRequestId = 'a6321000000XmT0AaC';
// Construct the request
ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestRequest request = new ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestRequest(
roleRequestId
);
ffscpq.EstimateCalculationService.CalculateEstimateRoleRequestResponseglobal with sharing class CalculateEstimateRoleRequestResponse The result returned after calculating the net amount of a role request. Properties
ffscpq.EstimateCalculationService.CalculateEstimateProductResponseglobal with sharing class CalculateEstimateProductResponse The result returned after calculating the net amount for an estimate product instance. Properties
ffscpq.EstimateCalculationService.EstimateCalculationErrorglobal with sharing class EstimateCalculationError The error that occurred while processing a request. Properties
|