Class SpmCustomerList
SpmCustomerList
Syntax
Constructors
SpmCustomerList()
Initializes a new instance of the SpmCustomerList class.
Declaration
SpmCustomerList
Methods
addRecipient(Integer)
Adds a recipient to the list.
Declaration
Void addRecipient(Integer customerId)
Parameters
| Type | Name | Description |
|---|---|---|
| Integer | customerId | The ID of the customer to add. |
Returns
| Type | Description |
|---|---|
| Void |
Remarks
The recipient must exist as a customer in the database.
delete()
Deletes the current recipients list.
Declaration
Bool delete()
Returns
| Type | Description |
|---|---|
| Bool | True if the list was deleted; false if the list does not exist or it currently is in use. |
Remarks
It is not possible to delete a list that currently is in use.
load(Integer)
Loads an existing customer list.
Declaration
load(Integer id)
Parameters
| Type | Name | Description |
|---|---|---|
| Integer | id | ID of the list to load. |
Returns
| Type | Description |
|---|---|
| Bool | True if successful; otherwise, false. |
removeRecipients()
If you have loaded a valid customer list, this method will remove all recipients both from the database and any you may have added using "addRecipient". Be aware that even if you do not save the list, the recipients will still be removed from the database.
Declaration
Void removeRecipients()
Returns
| Type | Description |
|---|---|
| Void |
save()
Saves the current list. If the list does not already exist in the database, it will be created.
Declaration
Integer save()
Returns
| Type | Description |
|---|---|
| Integer | ID of the list; -1 if the list could not be saved. |
setFolderId(Integer)
Sets the folder for this list.
Declaration
Void setFolderId(Integer folderId)
Parameters
| Type | Name | Description |
|---|---|---|
| Integer | folderId | ID of the folder where you want the list. |
Returns
| Type | Description |
|---|---|
| Void |
setName(String)
Sets the name of the list.
Declaration
Void setName(String name)
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | The name of the list. |
Returns
| Type | Description |
|---|---|
| Void |
Remarks
Used only in the GUI when viewing the lists.