Jobs: reports, email and links
Print a basic job summary
/a/Job_print
Render a basic HTML job summary and ask the browser to open its print dialog.
When to use this endpoint
Use for the legacy quick-print view, not the configured PDF/Word report layout. It prints overview fields, stock and form answers using the current form definition.
Authentication and permissions
Requires signed API-key or CRM-session authentication and the authenticated tenant. No additional page/role or completion check is made.
The dispatcher explicitly exempts Job_print from CRM-session CSRF checks so a signed-in browser can load it in an iframe. This is not a public share URL; account/user/IP restrictions still apply.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | Integer string | Yes | Positive physical active job ID. |
Example request
// Signed-in browser quick-print view (GET is used by the CRM).
window.open('/a/Job_print/id=1042', '_blank');
Example response
<html><head><style>...</style></head><body>
<h2>Job with Example customer</h2>
<!-- Overview, stock and form-data tables -->
<script>setTimeout(function(){window.print();}, 500);</script>
</body></html>
Abbreviated HTML, not JSON. Success sets Content-type: text/html and exits. Missing jobs output the plain text no such job? and exit, rather than a JSON error.
Errors and unusual responses
| Response | Condition |
|---|---|
{"error":"not logged in"} | No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs. |
{"error":"missing or invalid parameter: id"} | Missing/nonpositive id. |
no such job? | Job does not exist or is deleted; this is raw text, not a JSON envelope. |
Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.
Behaviour and edge cases
- Current users, customers, parent customers, assets, stock and forms supply display values without active filters on those related lookups. Customer jobs show parent » child; asset jobs show the owner when available, otherwise the asset name.
- Displays scheduled tenant-local time, assignee, flattened structured notes, parent company, form name/number and customer reference (column, then meta fallback). Stock shows catalog description, used quantity and current catalog price, not a full financial reconciliation.
- Answers are addressed by form field name. Checkbox values on or integer 1 become Yes, choice values discard text after a pipe, signatures render as images and table rows use the referenced table form’s current positional columns.
- Image values containing file:// or content:// are resolved to tenant image URLs by basename; other values are treated as PNG base64. This renderer does not implement every modern report widget or image encoding.
- No pagination, layout selection or report-service cache is used. Malformed/missing form or legacy answer shapes are not fully guarded.
Side effects
- Outputs executable HTML that calls window.print() after 500 ms. No sent markers, generated-file cache or business-data writes occur in this handler.
See it in Fieldmotion
CRM1
Open job Export/Choose Format, then Print. jobExport.js creates an iframe with /a/Job_print/id=<ID> and removes it after ten seconds; filter Job_print in Network.
CRM2
jobExport.js retains a print iframe handler, but its visible Print option is commented out. PDF download is the exposed export action; do not infer a currently visible Print button.
Related endpoints
Job_getAsPdfuses the configured report service and returns PDF/HTML report data.Job_getAsDocxsupports Word-form reports.