+=item by_agentnum AGENTNUM, KEY => VALUE, ...
+
+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).
+
+=cut
+
+sub by_agentnum {
+ my( $class, $agentnum, %opt ) = @_;
+
+ qsearch({ 'table' => 'part_svc_link', #$class->table,
+ 'hashref' => \%opt,
+ 'extra_sql' =>
+ $agentnum
+ ? "AND ( agentnum IS NULL OR agentnum = $agentnum )"
+ : 'AND agentnum IS NULL',
+ });
+
+}
+