ALMRowCreateHandler Interface

Allows users to handle ALMRowCreateEvent events produced by the Advanced Line Manager.

Methods

createRow(ALMRowCreateEvent event)

Handles the creation of new rows for an instance of the ALM component.

Signature

List<SObject> createRow(ALMRowCreateEvent event)

Parameters
Type: ALMRowCreateEvent

Return Value
The new rows to be displayed by the ALM component.
Type: List<SObject>

Sample Implementation

public List<SObject> createRow(ALMRowCreateEvent event){
  // create a list to hold the new Payable Lines
  List<Account_Payable_Line__c> lines = new List<Account_Payable_Line__c();
  // create the number of rows specified by createRowsCount
  for(Integer i=0; i<event.createRowsCount; i++){
    // create a new row with some default values
    lines.add(new Account_Payable_Line__c(
      Date__c = System.today()
    ));
  }
  // return the new lines
  return lines;
}