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.