Skip to main content
SpmCustomerList

Constructors

SpmCustomerList()

Initializes a new instance of the SpmCustomerList class.

Methods

addRecipient(Integer)

Adds a recipient to the list.
Returns: CRMScript.Global.Void
The recipient must exist as a customer in the database.

delete()

Deletes the current recipients list.
Returns: CRMScript.Global.Bool - True if the list was deleted; false if the list does not exist or it currently is in use.
It is not possible to delete a list that currently is in use.

load(Integer)

Loads an existing customer list.
Returns: CRMScript.Global.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.
Returns: CRMScript.Global.Void

save()

Saves the current list. If the list does not already exist in the database, it will be created.
Returns: CRMScript.Global.Integer - ID of the list; -1 if the list could not be saved.

setFolderId(Integer)

Sets the folder for this list.
Returns: CRMScript.Global.Void

setName(String)

Sets the name of the list.
Returns: CRMScript.Global.Void
Used only in the GUI when viewing the lists.