Retrieving the Default Rate Via Code

The following global Apex method can be used to retrieve the default Rate for a Matter, Timekeeper and/or Matter/Timekeeper. (new in Spring 2016)

Syntax:

AdvologixUtilities.getDefaultRate(
  @matterId,
  @timekeeperId
);


Parameters:

@matterId
The record identifier of the Matter record.

@timekeeperId
The record identifier of the Timekeeper record.


Result:

The function call will return an object of type: advpm__Rate__c. This object has the following  fields:

  • ID 
    The record identifier of the Rate object.

  • advpm__Rate__c
    The Rate amount of the Rate object.


Example:

advpm__Rate__c   rate   = AdvologixUtilities.getDefaultRate(

 'a059000000RJhKTEA1',
 'a1A6000000GbrCTAA5'

);

Example Result:

  • rate.Id
    The record identifier of the Rate object.
  • rate.advpm__Rate_c 
    The Rate amount of the Rate object.