It was mentioned in the previous section on the "Document Type" card you can also add attachments alongside reports. Below is how you can do this:
- Open the "Doc. Delivery Attachments" page
- Create a new line, providing a new Code and Description for the attachment you want to add to Business Central
- In the ribbon, select Import and choose the file you want to use as your Attachment
The Attachment Imported field will then be ticked once the file has been imported successfully. This can now be linked to your Document Type card.
On the "Document Type" card within the Attachments FastTab:
- Add a New Line and Sequence No
- Set Attachment Type as Attachment (rather than Report)
- Under Attachment Code, click the dropdown and select the attachment you require
The Attachment Name and Batch Attachment Name can be changed to be something other than the description given to the attachment code on creation. You can customise the Attachment Name to show a key detail about the document contents, for example the sales invoice number.
When using Batch sending, if multiple records are selected for multiple customers and your Default Batch Send Behaviour is set to 'Multiple Attachments', when the documents are Sent, Document Delivery will create a single email per customer using the Batch Subject from the "Document Type". All invoices will be attached as multiple PDF's with their own unique filename.
If using the same setup as above, except the Default Batch Send Behaviour is 'Single Attachment', you will still get a single email per customer except this time, it will send just 1 PDF per customer using a generic (grouped) filename, such as Sales Invoices.
Document Links with Document Delivery
If you have Clever Document Links installed, you can ensure documents that are stored as "Linked Documents" from Clever Document Links can be sent with your Document Types using Document Delivery. Here's a brief guide on the process.
- Upload a document against an Item or Document using Document Links that you are sending with document delivery (such as a Posted Sales Invoice).
- Ensure this document has attributes stored against it
- Ensure the related Document Type has an Attachment Code and is using Linked Documents (setup below)
- The Attachment code must have the same attributes stored against it as the Linked Document
- Send the document using Document Delivery, which will also send the Document Links file.
The above can be done at both document level or Item level.
Open up the "Document Type" you wish to add an attachment for and scroll down to the Attachments section. Add a new line for the next Sequence No and change the Attachment Type to "Attachment".
In the ribbon of the Attachments area, select the Doc. Type Attachment Card option to open the attachment card. In the Attachment Code field, create a new code for the attachment. This can be generic, it doesn't have to relate to just 1 attachment document so in the example below, it is called "PSI Attach". Tick this as a Linked Document and assign both a Linked Doc Attribute Code and Linked Doc Attribute Value. This will be looking at the attribute codes and values from the Document Links Linked Documents so be specific about which codes you want Doc Delivery to pick up on. Note: There isn't an Attachment Imported because in this instance I only want to use Doc Links files and not imported Doc Delivery Attachments.
Once this code is assigned on the "Doc Type Attachment Card", you'll notice that Linked Document toggle marks itself as 'Yes' automatically.
Now process a document as you would within Business Central but before you release/post the document, ensure it has a Document Links file attached to it. In this example, my "Doc Delivery Document Type" is the 'Posted Sales invoice' so I am attaching my file to a Posted Sales Invoice so that when I send it with Doc Delivery, the Posted Sales Invoice and my new Doc Links attachment will be sent using Document Delivery.
Initially when you upload the file with Doc Links, the attachment will have no Attributes, so when the file is uploaded, click into the Attributes section in the ribbon above to assign some. The attributes given must include the Linked Doc Attribute Code and Linked Doc Attribute Value you assigned to the Attachment record in your Document type.
So now when I send the email for the Posted Sales Invoice, it will attach the Doc Links file attached to the record too.
It is also possible to send a file linked to an Item Card through document delivery in the same way, this time relying on the Document Links file being uploaded to the Item card prior to sending the related document through document delivery. As this uses Linked Tables, see here for more setup instructions.