The following global Apex method can be used to retrieve an accrual by it's record id.
Syntax:
AccrualsService.getAccrual(
@recordId,
@fields
);
Parameters:
@recordId
The record identifier of the Accrual record.
@fields
Optional. The comma-separated list of fields that would be returned for the accrual record.
(If left empty, then the result will include all fields from the Accrual)
Result:
The function call will return an object of type: advspm__Accrual__c. This object will have fields based on the input parameters.
Example:
advspm__Accrual__c accr = AccrualsService.getAccrual( 'a059000000RJhKTEA1' );