Skip to content

SubDocument

SubDocument

SubDocument is a relationship between two independent Documents. It is frequently used for cases when we have a Parent with unlimited children, like a Purchase Order with items, since the items is not loaded with the Purchase Order.

The relationship must be configured in DocumentType admin page, you can choose another DocumentType to be a SubDocument. The SubDocument relationship must be a composition type, this will define how the relationship works.

The SubDocument is an independent document, this is not loaded

PARENT

All the SubDocuments created by Screen is always new documents related to a Parent (the document from screen), all child document just have one parent, otherwise, a child document cannot be related to another parent.

COMPOSED

The SubDocuments can be created and/or can be used an existent one, can be configured in Screen SubDocument options. In this case the SubDocument can be related to many "Parents".

Filter

Composed type SubDocuments can configure a filter to be applied when searching for documents to relate to the parent document.

The filter has the following options:

  • Readonly: filter data can't be cleared when this options is checked;
  • Active: enable/disable the SubDocument filter;
  • Filter data: SubDocument fields conditions used to filter the search result.

A SubDocument filter can only be used with the Document screen component. See the Document Screen Component Documentation to see how to use it.