Use the Create Document Views form to enter a document view's name and choose what it presents, then add columns once the view is saved. A document view is a named column configuration that controls which fields appear and how each column is labelled, typed, sized and shown by default. Because the storefront reads this configuration, changing a view changes what customers see in document tables, with no code deployment. A view set up for a document's header card also shapes that document's downloaded PDF and spreadsheet.
Before you begin
Decide whether the view presents a live ERP function or a data model, because a view needs one of the two.
The list of ERP functions offered for a view includes only functions in the documents category that are live for the client. If the function you want is not listed, fix it in ERP Manager: it may lack a category, may not be active for this client, or may still need to be pushed.
Steps
In the navigation, select Document Views.
Select Create. The Create Document Views form opens.
In Name, enter a name for the document view. Name is required. The form notes that this is the name an implementer sees in Site Builder. Whatever you enter as the name appears in Site Builder exactly as typed, with nothing substituted. Pick a name that describes what the view shows to the people who assemble pages, rather than the ERP function's technical name.
If the view presents a live ERP function, open View key and select the function. Otherwise, leave View key empty for a model-backed view.
If the view is model-backed, open Model Resource and select a resource. The resource is the data model the view is based on. Model class is read-only.
Optional: In Model key, enter a model key for the view.
Select Save. On the empty form, Save is unavailable. Save becomes available after you change a field value. The form reminds you to save the document view first to configure columns. The saved view record opens.
On the saved record, select Add columns.
Fill in the column's Field, Label, Type, Width and Show column by default values. Each column takes its values from the field you choose. Label is the text users see for the column. The column's type decides how its values are formatted, for example as a date, a price or a status. Width is the column width, for example 160px. Show column by default controls whether the column is visible by default. A column that is hidden does not reach the storefront.
Select Add columns again for each additional column.
Result
The document view is saved with its name and column configuration. It appears in the Document Views list.
The saved record has a read-only Source field that says whether the view is a synced default or an admin override.
For a view that presents a live ERP function, the matching storefront document table shows the configured columns after a refresh.
If something goes wrong
Each live ERP function can back only one document view, so a second view for the same function is rejected with a validation message. Edit the existing view for that function instead of creating another.
A view with no columns, or with every column hidden, leaves the storefront on its default columns. If the storefront still shows its default columns, add a column or make one visible, then refresh the storefront page.
Related

