% 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_svc_link - Object methods for part_svc_link records
use FS::part_svc_link;
$record = new FS::part_svc_link \%hash;
$record = new FS::part_svc_link { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::part_svc_link object represents an service definition dependency. FS::part_svc_link inherits from FS::Record. The following fields are currently supported:
primary key
Empty for global dependencies, or agentnum (see FS::agent) for agent-specific dependencies
Source service definition (see FS::part_svc)
Destination service definition (see FS::part_svc)
Link type:
In package defintions, require the destination service definition when the source service definition is included
Soft order block: in package definitions, suggest the destination service definition when the source service definition is included
Require the destination service to be provisioned before the source service
Require the destination service to be unprovisioned before the source service
Automatically unprovision the destination service when the source service is unprovisioned
Suspend the destination service after the source service
Creates a new record. To add the record to the database, see "insert".
Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
Alternate search consructor. Given an agentnum then a list of keys and values, searches for part_svc_link records with the given agentnum (or no agentnum).
Additional keys and values are searched for in the part_pkg_link table (typically src_svcpart and link_type).
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 record. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns an extended description of this dependency, including. Exact wording depends on link_type.
Returns the source service definition, as an FS::part_svc object (see FS::part_svc).
Returns the source service definition name (part_svc.svc).
Returns the destination service definition, as an FS::part_svc object (see FS::part_svc).
Returns the destination service definition name (part_svc.svc).