Show/Hide Toolbars

The following sample reads the specified properties of a group account record. All available properties of a group account are listed but you can comment out or remove unnecessary properties in your application to improve performance.

Code Snippet

//define the list of group account record properties to return with the readGroupAccount results

protected GroupAccountRepository groupAccountRepository;

private List<String> getProperties() {

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

properties.add("uniqueName");

properties.add("displayName");

properties.add("description");

properties.add("createdBy");

properties.add("createdOn");

properties.add("modifiedBy");

properties.add("modifiedOn");

properties.add("users");

return properties;

}

public GroupAccount test_readGroupAccount() throws Exception {

//it is assumed that a group account record exists with the unique key equal to String, uniqueKey

GroupAccount searchedGroup = groupAccountRepository.readGroupAccount(uniqueKey, getProperties());

return searchedGroup;

}