--- title: "Document Handling - Lasernet FO Connector User Guide" slug: "document-handling" description: "Document handling saves a document as an attachment to a record in the system and can be configured per report with specific location and criteria." tags: ["Document handling", "Accounts receivable", "PDF", "Free text invoices", "Reports action pane", "Expression editor", "Lasernet FO Connector", "Skip generic document handling", "Dynamics 365", "XML", "Invoices"] updated: 2025-11-10T11:05:02Z published: 2025-11-10T11:05:02Z canonical: "kb.lasernetgroup.com/document-handling" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt > Use this file to discover all available pages before exploring further. # Document Handling Document Handling is a function that saves a document as an attachment to a record in the system. Lasernet can save PDF, EDI, XML, or any other format that the Lasernet server can create and save as an attachment to a record in Dynamics 365. Document Handling can be configured per report, and the specific location and criteria to save the report can be configured. To access the **Document handling** form, follow these steps: 1. Navigate to **Lasernet** > **Common** > **Reports** and select the desired report from the list. 2. On the Action pane, click **Setup** > **Document handling** in the **Distribution** group. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-61GS4DPU.png) If the **Skip generic document handling** toggle button is set to **No**, no generic document handling is used for the current report. The following table and lists explain more about the criteria you can set for document handling of a report: | Save report file in document handling | Details | | --- | --- | | Document reference table | A related source defined for the report. | | Restriction | **Internal**: attachments are restricted to internal use only. **External**: attachments are restricted to external use only. | | Type | Document type from **Document Management** that will be used to store the attachment. | | ![A white square with black and blue lines Description automatically generated](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-1701258449288.png) | To apply custom fields. | | Document type | To specify a document type for using overlays: All types, Original, Pro forma, Pro forma copy. | | PDF | Document Handling is used when emailing, archiving, or previewing. | | Printer | Document Handling is used when printing. | | Fax | Document Handling is used when faxing. | | Custom port | Document Handling is used when applying a custom port. | | Description | To provide a meaningful description. | - **Condition**: A condition can be used to control when Document Handling runs: - **None**: Will always try to run this Document Handling. - **Query**: Can use query filters and ranges. Will run this Document Handling if the query filters or ranges are met, and will not run this Document Handling if the query filters or ranges are not met. - **Code**: Can use an expression. Will run this Document Handling if the code condition expression is **True** or **1**, and will not run this Document Handling if the code condition expression is **False** or **0**. | Notes | Details | | --- | --- | | Description | To provide a meaningful description. Values can be used here. | | Note | To provide a meaningful description. Values can be used here. | - **Values used in notes**: To select fields from tables that can be used for a note and its description. For more information on the topic, watch our [feature video](/v1/docs/configure-document-handling-in-the-lasernet-connector). ### Example In this example, we will use Document Handling to add Free Text invoices as attachments in the **All free text invoices** list page. 1. In Finance and Operations, navigate to the location where you would like to add your attachments. In this case, navigate to **Accounts receivable** > **Invoices** > **All free text invoices**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-W5RDGF2Z.png) 1. Identify the system name for the Customer Invoice Journal table. To this end, right-click the **Invoice** field and select **Form name** from the **Form information** option. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-L61HNVSV.png) 1. A **Form information** dialog opens. The system table name can be found in the **DataSource** and **Query statement** fields. In this example, the system table name is **CustInvoiceTable**. Take note of this value for later use. > [!NOTE] > Note > > The system table name can also be found using the table ID. For more information, refer to [this article](/v1/docs/find-table-name-using-table-id-for-docuref-and-attachments). ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-5RST8ECO.png) 1. Navigate to **Lasernet** > **Common** > **Reports**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-IJ0I1P2F.png) 1. Select the required report, for example, **FreeTextInvoiceReplacement**. 2. Click **Setup** > **Document handling**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-L13D261T.png) 1. Select **CustInvoiceTable** under **Document reference table**, set the restriction as needed, and click **Save**. > [!NOTE] > Note > > If the table is not available for selection in the **Document reference table** dropdown, it must be added to the query using the Query Wizard. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-6SAIZHCH.png) 1. Navigate to **Accounts receivable** > **Invoices** > **All free text invoices**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-AW7HS9UR.png) 1. Resend the Lasernet **FreeTextInvoiceReplacement** report by selecting a record and clicking **Invoice** > **Lasernet** > **Resend**. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-I1VQMSC2.png) 1. In the dialog window that appears, select a print destination and then click **OK**. 2. Check the attachment to the report by clicking the paperclip icon at the top of the page. This icon is usually on the top right corner of the ribbon, but in this case, it is located next to the **Notes and attachments** menu button. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-MCHJVGRK.png) 1. The Free Text invoice is attached with the **Restriction** and any other settings configured from the **Document handling** setup. ![](https://cdn.document360.io/c831ef63-c6b3-48ee-b443-3e33644e4e2e/Images/Documentation/image-FNATEI44.png)