Represents a set of addresses associated with a specific customer.
The AddressBook object gets its data from the Profile object for the customer.
When scripting, this class allows AddressBook to be treated as a separate object
from the Profile. However, data is only stored in the platform in the Profile object
and there is no separate AddressBook object. For this reason, the AddressBook ID is
always the customer profile ID.
Note: this class allows access to sensitive personal and private information.
Pay attention to appropriate legal and regulatory requirements when developing.
Returns a sorted list of addresses in the address book. The addresses
are sorted so that the preferred address is always sorted first. The
remaining addresses are sorted alphabetically by ID.
Returns a sorted list of addresses in the address book. The addresses
are sorted so that the preferred address is always sorted first. The
remaining addresses are sorted alphabetically by ID.
Returns:
Sorted List of customer addresses in the address book.
Removes the specified address from the address book. Because an address
can be associated with a product list, you may want to verify if the
address is being used by a product list. See ProductListMgr.findAddress().
Parameters:
address - the address to remove, must not be null.
Sets the specified address as the customer's preferred address. If null
is passed, and there is an existing preferred address, then the address
book will have no preferred address.
Parameters:
anAddress - the address to be set as preferred, or null if the goal is to unset the existing preferred address.