Auto-rebuild

The auto-rebuild feature keeps document compositions up to date when attachments are added to or removed from a document. When enabled, Ventoo Document Merger automatically adjusts the composition without requiring manual intervention.

Enable auto-rebuild

  1. Open the Doc. Merge Setup page.

  2. Set Auto Rebuild Active to Yes.

How auto-rebuild works

Auto-rebuild responds to changes in two areas:

Document attachments

When a document attachment is added to or removed from a Business Central document:

  • If auto-rebuild is active and the document list has not been manually adjusted, the system performs a full rebuild of the composition from the applicable rules.

  • If the list has been manually adjusted, the system performs a partial update instead: it appends the new attachment or removes the deleted one without rebuilding the entire list.

Incoming documents

When an incoming document is linked to or unlinked from a Business Central document:

  • The system adds or removes the corresponding incoming document attachments from the composition.

  • The same logic applies: full rebuild if not manually adjusted, partial update otherwise.

Manual adjustment protection

When you make manual changes to a document composition (reorder items, exclude/include documents, toggle attach separately), the composition is marked as Manually Adjusted. This flag prevents auto-rebuild from overwriting your changes.

Scenario

Auto-rebuild behavior

List not manually adjusted

Full rebuild from rules.

List manually adjusted, new attachment added

Appends the new attachment to the end of the list.

List manually adjusted, attachment deleted

Removes the deleted attachment from the list.

Note To reset the manual adjustment flag and allow a full rebuild, use the Rebuild action on the document composition.

When auto-rebuild does not trigger

Auto-rebuild does not activate in the following situations:

  • Auto-rebuild is disabled in the setup.

  • The document type is not enabled in the setup.

  • The change is to a record that is not linked to a Ventoo Document Merger-enabled document.