% 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::part_referral - Object methods for part_referral objects
use FS::part_referral;
$record = new FS::part_referral \%hash
$record = new FS::part_referral { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::part_referral represents a advertising source - where a customer heard of your services. This can be used to track the effectiveness of a particular piece of advertising, for example. FS::part_referral inherits from FS::Record. The following fields are currently supported:
These were called referrals before version 1.4.0 - the name was changed so as not to be confused with the new customer-to-customer referrals.
Creates a new advertising source. To add the referral to the database, see "insert".
Adds this advertising source to the database. If there is an error, returns the error, otherwise returns false.
Currently unimplemented.
Replaces 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 advertising source. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the associated agent for this referral, if any, as an FS::agent object.
Returns an SQL fragment for searching for part_referral records allowed by the current users's agent ACLs (and "Edit global advertising sources" right).
Pass a true value to include global advertising sources (for example, when simply using rather than editing advertising sources).
Returns all part_referral records allowed by the current users's agent ACLs (and "Edit global advertising sources" right).
Pass a true value to include global advertising sources (for example, when simply using rather than editing advertising sources).
Returns the number of part_referral records allowed by the current users's agent ACLs (and "Edit global advertising sources" right).
The delete method is unimplemented.
`Advertising source'. Yes, it's a sucky name. The only other ones I could come up with were "Marketing channel" and "Heard Abouts" and those are definately both worse.
FS::Record, FS::cust_main, schema.html from the base documentation.