# (deprecated, will be singularlized
# simplisticly)
- #literal SQL query string (deprecated?) or qsearch hashref or arrayref
+ #literal SQL query string (corner cases only) or qsearch hashref or arrayref
#of qsearch hashrefs for a union of qsearches
'query' => {
'table' => 'tablename',
},
# "select * from tablename";
-
- #required unless 'query' is an SQL query string (shouldn't be...)
+
+ #required (now even if 'query' is an SQL query string)
'count_query' => 'SELECT COUNT(*) FROM tablename',
###
#(query needs to be a qsearch hashref and
# header & fields need to be defined)
- #handling agent virtualization
+ # Agent Virtualization parameters:
+ # In this context, only available if your selected table has agentnum.
+ # You must also include agentnum as a SELECT column in your SQL query,
+ # or experience non-obvious problems
+ #
'agent_virt' => 1, # set true if this search should be
# agent-virtualized
'agent_null' => 1, # set true to view global records always
'agent_pos' => 3, # optional position (starting from 0) to
# insert an Agent column (query needs to be a
# qsearch hashref and header & fields need to
- # be defined)cust_pkg_susp.html
+ # be defined)
# sort, link & display properties for fields
my $curuser = $FS::CurrentUser::CurrentUser;
+$m->comp('/elements/handle_uri_query');
+
my $type = $cgi->param('_type') =~ /^(csv|\w*\.xls|xml|select|html(-print)?)$/
? $1 : 'html' ;