Show/Hide Toolbars

The following sample reads an existing account record.

Code Snippet

//for this example, it is assumed that you already know the target account record's unique key (where uniqueKey is a String variable)

protected AccountRepository accountRepository;

public void readAccount() throws Exception {

Account account = (Account) accountRepository.readAccount(uniqueKey, getPropertiesToRead());

}

private List<String> getPropertiesToRead() {

List<String> properties = new List<String>();

properties.add("createdBy");

properties.add("createdOn");

properties.add("modifiedBy");

properties.add("modifiedOn");

properties.add("name");

properties.add("allocated");

properties.add("allocationLimit");

properties.add("used");

properties.add("available");

properties.add("startOn");

properties.add("endOn");

properties.add("expensePercent");

properties.add("invoiceExpensePercent");

properties.add("invoiceTaskPercent");

properties.add("taskPercent");

properties.add("allowExpense");

properties.add("allowTask");

properties.add("allowInvoiceExpense");

properties.add("allowInvoiceTask");

properties.add("accountInvolvedType");

properties.add("accountVendorType");

properties.add("accountProjectType");

properties.add("accountOverdraftType");

properties.add("type");

properties.add("active");

properties.add("autoPost");

properties.add("categories");

properties.add("expenseCategory");

properties.add("taskCategory");

properties.add("projectCategory");

properties.add("invoiceExpenseCategory");

properties.add("invoiceTaskCategory");

properties.add("involved");

properties.add("project");

properties.add("vendor");

properties.add("parentAccount");

return properties;

}