PSA Apex API Developer Reference

pse.UtilizationAnalyticsService

global with sharing class UtilizationAnalyticsService

this service provides the functionality relating to utilization analytics.

Methods

runUtilization

global static pse.UtilizationAnalyticsService.RunUtilizationResponse runUtilization()

Queues Utilization Analytics Apex jobs to asynchronously process objects required. For example, Timecards and Assignments.

Return Value

The result of the operation.

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.

pse.UtilizationAnalyticsService.RunUtilizationResponse response = pse.UtilizationAnalyticsService.runUtilization();
if (!response.errors.isEmpty()){
  System.debug('Errors: ' + response.errors);
}

runUtilization

global static pse.UtilizationAnalyticsService.RunUtilizationResponse runUtilization(Date startDate, Date endDate)

Queues Utilization Analytics Apex jobs to asynchronously process objects required. For example, Timecards and Assignments.

Input Parameters

Name Type Description
startDate Date : Value to set the start date for the Utilization Analytics Apex job run.
endDate Date : Value to set the end date for the Utilization Analytics Apex job run.

Return Value

The result of the operation.

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.

pse.UtilizationAnalyticsService.RunUtilizationResponse response = pse.UtilizationAnalyticsService.runUtilization();
if (!response.errors.isEmpty()){
  System.debug('Errors: ' + response.errors);
}

runUtilization

global static pse.UtilizationAnalyticsService.RunUtilizationResponse runUtilization(pse__Utilization_Setup__c setup)

Queues Utilization Analytics Apex jobs to asynchronously process objects required. For example, Timecards and Assignments.

Input Parameters

Name Type Description
setup pse__Utilization_Setup__c : The instance of the Utilization Setup, used to derive parameters for the Utilization Analytics Apex job run.

Return Value

The result of the operation.

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.

pse.UtilizationAnalyticsService.RunUtilizationResponse response = pse.UtilizationAnalyticsService.runUtilization();
if (!response.errors.isEmpty()){
  System.debug('Errors: ' + response.errors);
}

pse.UtilizationAnalyticsService.RunUtilizationResponse

global inherited sharing class RunUtilizationResponse

the response structure from creating a utilization run.

Properties

Name Type Description
errors List<String> a list of the errors encountered by the utilization analytics service call.

Methods

RunUtilizationResponse

global RunUtilizationResponse()

A constructor that creates a new RunUtilizationResponse instance.

© Copyright 2009–2022 FinancialForce.com, inc. All rights reserved. Various trademarks held by their respective owners.