AdvoLogix Help

Retrieving the Default Rate via Code

Updated on

The following global Apex method can be used to retrieve the default Rate for a UTBMS Code or Matter, Timekeeper, Role and/or Matter/Timekeeper/Role.

Syntax:

RatesService.getDefaultRate(
      Map<String, String> @params
);


Parameters:

@params
The map of input parameters necessary to retrieve default rate of the Matter record. This @params input is a composite input variable representing a key = value pair of Map<String, String> data type with set of following keys:

  • matterId - Optionally, provide your Matter record id here.
  • timekeeperId - Optionally, provide your Timekeeper record id here.
  • roleId - Optionally, provide your Role record id here.
  • utbmsCodeId - Optionally, provide your Utbms Code record id here.
  • currIsoCode - Optionally, provide currency ISO Code.


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. (not returned when default rate for UTBMS Code is found)

  • advpm__Rate__c
    The Rate amount of the Rate object.


Example:

Map<String, String> params = new Map<String, String> {
    'matterId'        => 'a059000000RJhKTEA1',
    'timekeeperId'    => 'a1A6000000GbrCTAA5',
    'roleId'          => 'a06800000pKrgBhA01',
    'utbmsCodeId'     => 'b0A000000RJhKTEA21',
    'currIsoCode'     => ''
};
advpm__Rate__c rate = RatesService.getDefaultRate( params );


Example Result:

  • rate.Id
    The record identifier of the Rate object. (not returned when default rate for UTBMS Code is found)
  • rate.advpm__Rate_c
    The Rate amount of the Rate object.
Previous Article Rounding Hours Via Code
Next Article Timekeeping
Still need help? Click here!
AdvoLogix® is a registered trademark of AdvoLogix.com LLC a Texas Limited Liability Company. All references to other trademarks belonging to third parties that appear on this website, documentation, or other materials shall be understood to refer to those registered trademarks owned by others, and not to any trademark belonging to AdvoLogix. Otherwise, all material herein is the copyright of AdvoLogix.com LLC. All Rights Reserved.