% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::cust_attachment - Object methods for cust_attachment records
use FS::cust_attachment;
$record = new FS::cust_attachment \%hash;
$record = new FS::cust_attachment { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::cust_attachment object represents a file attached to a FS::cust_main object. FS::cust_attachment inherits from FS::Record. The following fields are currently supported:
Primary key (assigned automatically).
Customer number (see FS::cust_main).
The date the record was last updated.
Order taker (see FS::access_user)
The file's name.
The Content-Type of the file.
The contents of the file.
If the attachment was disabled, this contains the date it was disabled.
Creates a new attachment object.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Delete this record from the database.
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
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.
Returns the size of the attachment in bytes.
Doesn't work on non-Postgres systems.
FS::Record, schema.html from the base documentation.