1 package FS::prospect_contact;
2 use base qw( FS::Record );
5 use FS::Record qw( qsearch qsearchs );
9 FS::prospect_contact - Object methods for prospect_contact records
13 use FS::prospect_contact;
15 $record = new FS::prospect_contact \%hash;
16 $record = new FS::prospect_contact { 'column' => 'value' };
18 $error = $record->insert;
20 $error = $new_record->replace($old_record);
22 $error = $record->delete;
24 $error = $record->check;
28 An FS::prospect_contact object represents a contact's attachment to a specific
29 prospect. FS::prospect_contact inherits from FS::Record. The following fields
30 are currently supported:
34 =item prospectcontactnum
63 Creates a new record. To add the record to the database, see L<"insert">.
65 Note that this stores the hash reference, not a distinct copy of the hash it
66 points to. You can ask the object for a copy with the I<hash> method.
70 # the new method can be inherited from FS::Record, if a table method is defined
72 sub table { 'prospect_contact'; }
76 Adds this record to the database. If there is an error, returns the error,
77 otherwise returns false.
81 Delete this record from the database.
83 =item replace OLD_RECORD
85 Replaces the OLD_RECORD with this one in the database. If there is an error,
86 returns the error, otherwise returns false.
90 Checks all fields to make sure this is a valid record. If there is
91 an error, returns the error, otherwise returns false. Called by the insert
96 # the check method should currently be supplied - FS::Record contains some
97 # data checking routines
103 $self->ut_numbern('prospectcontactnum')
104 || $self->ut_number('prospectnum')
105 || $self->ut_number('contactnum')
106 || $self->ut_numbern('classnum')
107 || $self->ut_textn('comment')
109 return $error if $error;
120 L<FS::contact>, L<FS::prospect_main>, L<FS::Record>