Gb Queries executeScript
Gb Queries executeScript
Scripts are groups of queries that modify data but return nothing. Can include unlimited SQL statements: UPDATE, INSERT, SET, LOCK TABLES, UNLOCK TABLES. Examples: set status to 'expired' for quotes older than 30 days.
Refer to User Defined Queries for script writing instructions.
Save script in gb_queries table before setup.
Important: Use transaction safe queries. Transaction safe queries rollback changes if any updates fail.
If script affects billing records, use stored procedures to lock/unlock billing tables.
Warning: Raise request via Lily to setup executeScript job.
Parameters
Run Now
Job failed! Error: CATCH_E_API_EXECUTE_SCRIPT_ERROR
Message shows script number. Script started but couldn't complete.
Billing Lock Error
Failure executing query #. Message: Statement could not be executed (45000 - 1644 - Billing already locked!) Billing lock couldn't be secured. Try later.
Validation Errors
Gb Record deleteLock
Delete single record from gb_locks table with auditing.
Input Fields
URL Example
https://yourname.catch-e.net.au/services/gb/record/deleteLock?_lock_key_=04354cb861aade428f723857ce2fb6fa Output Fields
Output Example
true Error Codes
Error Output
CATCH_E_ERROR_CANNOT_UNLOCK Gb Record lockRecord
Lock record in specified table. Useful when upsert performed on record that application locks at higher level (e.g. fm_contract_budgets). When system updates fm_contract_budgets, it locks parent fm_contracts record.
Warning: Always use same locking strategy as underlying application. If uncertain, raise request via Lily.
Input Fields
URL Example
https://yourname.catch-e.net.au/services/gb/record/lockRecord?_table_name_=fm_clients&_unique_id_=102130 Output Fields
Output Example
true Error Codes
Error Output
CATCH_E_ERROR_BAD_RECORD_LOCK Gb Record unlockRecord
Unlock record in specified table.
Input Fields
URL Example
https://yourname.catch-e.net.au/services/gb/record/unlockRecord?_table_name_=fm_clients&_unique_id_=102134 Output Fields
Output Example
true Error Codes
Error Output
CATCH_E_ERROR_BAD_RECORD_UNLOCK Gb Record update
Write values to single record with locking and auditing.
Warning: For experienced developers only with good understanding of data schema and business rules. If uncertain, raise request via Lily.
Input Fields
Field names not matching target table fields ignored. unique_id field cannot be updated.
URL Example
https://yourname.catch-e.net.au/services/gb/record/update?_table_name_=fm_contracts&_unique_id_=101939&colour=blue&state=NSW Output Fields
Output Example
true Error Codes
Error Output
CATCH_E_ERROR_BAD_QUERY_3 Gb SystemMaintenance checkSPFRecordForGbMailSenderDomains
Check and verify SPF record status of domains in gb_mail_sender_domains table. Checks status_flag 'enrolled' or 'failed'; all other statuses ignored.
If verification fails: status_flag changed to 'failed', failure info added to error_data field.
If verification succeeds for 'failed' record: status_flag updated to 'enrolled', error_data cleared.
If require_spf_check_flag set to 'yes' and domain not 'enrolled': emails won't send or use fall_back email. Refer Domain Setup page for full email impact details.
Job runs frequently with child job executeQueries immediately after, notifying Catch-e Support of failed verification domains.
Parameters
No run time parameters required.
Gb SystemMaintenance rebuildCostCentreAllocations
Rebuild fm_contract_cost_centre_allocations table. Run after importing 'CC' type contract events if don't want to wait for scheduled daily rebuild.
Parameters
No run time parameters required.
Gb SystemMaintenance rebuildDivisionAllocations
Rebuild fm_contract_division_allocations table. Run after importing 'DIV' type contract events if don't want to wait for scheduled daily rebuild.
Parameters
No run time parameters required.
Gb SystemMaintenance rebuildDriverAllocations
Rebuild fm_contract_driver_allocations table. Run after importing Driver Change contract events if don't want to wait for scheduled daily rebuild.
Parameters
No run time parameters required. Typically setup to run at 10:00 PM.
System Controls
quotes_search_results_limit
Quotes shown on Quotes / Search screen limited to 1,000 records by default to optimise page loading.
Users can update limit in Pagebar. Default limit reapplied when next navigating into Quotes module.
Was this helpful?
More in System & Records API
getCountriesReserveBatchNosWebServiceStill need help? Ask the team