- Print
- PDF
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:
Navigate to Lasernet > Common > Reports and select the desired report from the list.
On the Action pane, click Setup > Document handling in the Distribution group.
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. |
To apply custom fields. | |
Document type | To specify a document type for using overlays: All types, Original, Pro forma, Pro forma copy. |
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 conde 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.
Example
In this example, we will use Document handling to add Free Text invoices as attachments in the All free text invoices list page.
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.
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.
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
The system table name can also be found using the table ID. For more information, see: https://kb.lasernet.online/docs/find-table-name-using-table-id-for-docuref-and-attachments
Navigate to Lasernet > Common > Reports.
Select the required report, for example, FreeTextInvoiceReplacement.
Click Setup > Document handling.
Select CustInvoiceTable under Document reference table, set the restriction as needed, and click Save.
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.
Navigate to Accounts receivable > Invoices > All free text invoices.
Resend the Lasernet FreeTextInvoiceReplacement report by selecting a record and clicking Invoice > Lasernet > Resend.
In the dialog window that appears, select a print destination and then click OK.
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, is located next to the Notes and attachments menu button.
The Free Text invoice is attached with the Restriction and any other settings configured from the Document handling setup.