Difference between revisions of "Freeside:3:Documentation:Developer/FS/cust msg"

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
(No difference)

Revision as of 20:04, 27 June 2012

NAME

FS::cust_msg - Object methods for cust_msg records

SYNOPSIS

 use FS::cust_msg;

 $record = new FS::cust_msg \%hash;
 $record = new FS::cust_msg { 'column' => 'value' };

 $error = $record->insert;

 $error = $record->check;

DESCRIPTION

An FS::cust_msg object represents a template-generated message sent to a customer (see FS::msg_template). FS::cust_msg inherits from FS::Record. The following fields are currently supported:

custmsgnum - primary key; custnum - customer number; msgnum - template number; _date - the time the message was sent; env_from - envelope From address; env_to - envelope To addresses, including Bcc, separated by newlines; header - message header; body - message body; error - Email::Sender error message (or null for success)

METHODS

new HASHREF
Creates a new
insert
Adds this record to the database. If there is an error, returns the error and emits a warning; otherwise returns false.
delete
Delete this record from the database. There's no reason to do this.
replace OLD_RECORD
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error and emits a warning, otherwise returns false.
check
Checks all fields to make sure this is a valid example. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.

SEE ALSO

FS::msg_template, FS::cust_main, FS::Record.