AdvoLogix Help

Retrieving an Accrual List via Code

Updated on

The following global Apex method can be used to retrieve list of accruals by providing vendor or matter.

AccrualsService.getAccrualsList(
  @vendorRecordId,
  @matterIdOrNumber,
  @fields,
  @orderBy
); 

Parameters:

@vendorRecordId
The record identifier of the Vendor record.

@matterIdOrNumber
The Matter Number or the record identifier of the Matter record.

@fields
Optional. The comma-separated list of fields that would be returned for the accrual records.
(If left empty, then the result will include all fields from Accruals)

@orderBy
Optional. A SOQL compliant order by phrase using which you can get list of Accruals sorted by a specific column from Accruals.
For example, advspm__Start_Date__c ASC would return list of accruals in ascending order of Start Date.
(If left empty, then the result will be sorted by Created Date in ascending order)

Either @vendorRecordId or @matterIdOrNumber must be provided for this API method.

Result:

The function call will return an object of type: List<advspm__Accrual__c>. This object will have fields based on the input parameters.

Example:

List<advspm__Accrual__c> accrList = AccrualsService.getAccrualsList( 'a059000000RJhKTEAA', 'b126000000ghrEAABA' );

OR

List<advspm__Accrual__c> accrList = AccrualsService.getAccrualsList( 'a059000000RJhKTEAA', 'MAT-LK-2023' );
Previous Article Retrieving an Accrual via Code
Next Article Adding or Updating an Accrual via Code
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.