Show/Hide Toolbars

When reading a contact record, identify the target record by unique key. Use the ContactRepository readContact method.

Code Snippet

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

protected ContactRepository contactRepository;

public void readPersonContact() throws Exception {

Person readPerson = (Person) contactRepository.readContact(uniqueKey, getPropertiesToRead());

}

private List<String> getPropertiesToRead() {

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

properties.add("firstName");

properties.add("lastName");

properties.add("address.type");

properties.add("address.state");

return properties;

}