Steps
- Create the field first in Settings → User-defined fields (e.g. *Site name* on sales documents, or *Warranty months* on the lines).
- Open the template in Settings → Document layouts.
- For a header field: open Document title & number or a Document details section, click + Add field and pick it - it is marked "(user-defined)". Move it into place with ↑ ↓.
- For a line field: open Item table and + Add column.
- Save draft, check the preview with a real document (Preview with), then Publish….
Good to know
- Fields marked Show on printed documents also appear automatically under the title and under each item's description (the options "Also show user-defined fields…" and "Printed line-level user-defined fields"). Untick those options if you place them yourself.
- A field only prints when the document has a value in it.