Documents (print and PDF)
The Document component turns one record and its line items into a printable business document: a quotation, a purchase order, a work-order report, an inspection report or a receipt. People open it with Print / Save as PDF and use the browser's print dialog, or attach it privately
Beta — ready to use, but some details may still change.
The Document component turns one record and its line items into a printable business document: a quotation, a purchase order, a work-order report, an inspection report or a receipt. People open it with Print / Save as PDF and use the browser's print dialog, or attach it privately to the record. This feature is in beta.
How it works
- You place a Document on the details page of a record (for example
/quotes/:id) and bind its Data to that record, like a Detail View. - You choose the document type, the number and date fields, the header fields, the line items table and its columns, and an optional column to total.
- When someone clicks Print / Save as PDF, MyAppBuilder renders the document on the server, for that person: the record must be readable by their role, hidden fields are left out, and only line items they can read are listed. The page opens in a new tab with print styles (A4 or Letter, repeated table headers, no page breaks inside rows).
- With Attach to file field set, Attach to record stores the document as a private file in that field of the record. Only people who can read the record get a (temporary) link to it.
PDF files
MyAppBuilder doesn't create PDF files on the server. Producing reliable PDFs for every language and script needs embedded fonts and a layout engine, which we don't ship; instead the printable page is designed for the browser's Save as PDF printer (Chrome, Edge, Safari and Firefox on desktop; Share › Print on iOS and Android). Attached documents are stored as print-ready HTML pages, opened the same way.
Examples with the business starters
The tables below exist in the starters of the app library. Add the component yourself — starters don't include it yet.
| Document | Page / Data | Header fields | Line items (link field → columns) | Total |
|---|---|---|---|---|
| Quotation (Sales pipeline) | Quote details, Data: Quotes where ID = page id; number: Quote Number; date: Valid Until | Account, Contact, Status | Quote Lines (Quote) → Description, Quantity, Unit Price, Line Total | Line Total |
| Purchase order (Purchase to Receive) | Purchase order details, Data: Purchase Orders; number: PO Number; date: Expected Delivery | Supplier, Supplier Reference, Status | Purchase Order Lines (Purchase Order) → Description, Quantity Ordered, Unit Price | — (add a line total column to sum it) |
| Work order report (Work Order Manager) | Work Order page, Data: Work Orders; date: Completed At | Site, Asset, Technician, Status, Resolution Notes | Checklist Items (Work Order) → Item, Status, Result, Notes | — |
| Inspection report (Inspections & CAPA) | Inspection details, Data: Inspections; date: Scheduled For | Site, Asset, Inspector Email, Result, Summary | Inspection Answers (Inspection) → Check, Answer, Notes | — |
| Receipt (Purchase to Receive) | Goods receipt details, Data: Goods Receipts; number: Delivery Reference; date: Received At | Purchase Order, Received By | Goods Receipt Lines (Goods Receipt) → PO Line, Quantity | Quantity |
Quotations show the amounts your workflows stored (Subtotal, Tax Amount, Total as header fields). The Document itself never calculates taxes or discounts.
Attaching a document to a record
- Add a file field to the table, e.g. Report PDF on Work Orders.
- Select it in Attach to file field on the Document.
- Give the roles that should attach documents update access to the table, and make sure the field isn't read-only for them.
- Optional: use the Generate document action with Attach on, e.g. after the "Complete job" button's update.
Every attachment is recorded in the project's audit log (component, record and file ids — never the content).
Formats
Amounts, numbers and dates use the app's language/locale, currency and time zone (Settings › General): de-DE + EUR prints 1.234,50 €, en-US + USD prints $1,234.50. Calendar dates print as the same day everywhere; date-time values are shown in the app's time zone. Choice fields print their labels, yes/no fields print Yes or No, linked records print their display name (or — when the viewer can't read the linked record).
Security
- Everything printed is escaped; record values can never inject HTML or scripts. The printable page loads no external resources and runs no script except its own print button.
- The browser only sends the component and the record id; the server checks the page and component are visible to the user and applies table, record and field permissions.
- Attached files are private: they are served only with a short-lived signature, which the server adds when the record is returned to someone allowed to read it.
Limitations
- No server-side PDF; use the browser's Save as PDF.
- No taxes, discounts, currency conversion or legal/tax-compliance features — documents print the values your app stores. Don't use them as tax invoices where regulations require certified invoicing.
- Up to 500 line items; images and logos aren't embedded.
- Notes, footer and labels are fixed text (no record placeholders).
- Not available in sandboxed demos and template previews.