Difference between revisions of "Freeside:3:Documentation:Developer/FS/part svc column"

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
 
m (Edit via perl MediaWiki framework (1.13))
 
Line 20: Line 20:
 
An FS::part_svc_column record represents a service definition column constraint. FS::part_svc_column inherits from FS::Record. The following fields are currently supported:
 
An FS::part_svc_column record represents a service definition column constraint. FS::part_svc_column inherits from FS::Record. The following fields are currently supported:
  
; columnnum - primary key (assigned automatcially for new records); svcpart - service definition (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]); columnname - column name in part_svc.svcdb table; columnlabel - label for the column; columnvalue - default or fixed value for the column; columnflag - null or empty (no default), `D' for default, `F' for fixed (unchangeable), `S' for selectable choice, `M' for manual selection from inventory, `A' for automatic selection from inventory, or `H' for selection from a hardware class. For virtual fields, can also be 'X' for excluded.
+
; columnnum - primary key (assigned automatcially for new records); svcpart - service definition (see [[Freeside:3:Documentation:Developer/FS/part svc|FS::part_svc]]); columnname - column name in part_svc.svcdb table; columnlabel - label for the column; columnvalue - default or fixed value for the column; columnflag - null or empty (no default), `D' for default, `F' for fixed (unchangeable), `S' for selectable choice, `M' for manual selection from inventory, `A' for automatic selection from inventory, or `H' for selection from a hardware class. For virtual fields, can also be 'X' for excluded.; required - column value expected to be true
 
==METHODS==
 
==METHODS==
 
; new HASHREF
 
; new HASHREF

Latest revision as of 11:57, 26 May 2015

NAME

FS::part_svc_column - Object methods for part_svc_column objects

SYNOPSIS

 use FS::part_svc_column;

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

 $error = $record->insert;

 $error = $new_record->replace($old_record);

 $error = $record->delete;

 $error = $record->check;

DESCRIPTION

An FS::part_svc_column record represents a service definition column constraint. FS::part_svc_column inherits from FS::Record. The following fields are currently supported:

columnnum - primary key (assigned automatcially for new records); svcpart - service definition (see FS::part_svc); columnname - column name in part_svc.svcdb table; columnlabel - label for the column; columnvalue - default or fixed value for the column; columnflag - null or empty (no default), `D' for default, `F' for fixed (unchangeable), `S' for selectable choice, `M' for manual selection from inventory, `A' for automatic selection from inventory, or `H' for selection from a hardware class. For virtual fields, can also be 'X' for excluded.; required - column value expected to be true

METHODS

new HASHREF
Creates a new column constraint. To add the column constraint to the database, see "insert".
insert
Adds this service definition to the database. If there is an error, returns the error, otherwise returns false.
delete
Deletes this record from the database. If there is an error, returns the error, otherwise returns false.
replace OLD_RECORD
Replaces OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
check
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.

BUGS

SEE ALSO

FS::Record, FS::part_svc, FS::part_pkg, FS::pkg_svc, FS::cust_svc, FS::svc_acct, FS::svc_forward, FS::svc_domain, schema.html from the base documentation.