Although the answer to this question boils down tidily enough, it’s certainly not obvious from the front end of the application. When emailing Posted Sales invoices, Microsoft Dynamics 365 Business Central uses a standard hierarchy to determine which email address should be used as the target address.
The hierarchy is straightforward enough, but there are some not-obvious nuances that I’ll enumerate below. The hierarchy, from highest priority to lowest, is as follows:
- Sell-to Customer’s Document Layout
- Sell-to Customer’s Email
- Bill-to Customer’s Document Layout
- Bill-to Customer’s Email
- If none of the above emails are defined, the email will be created with a blank “To” value.
Notes
- In the screenshots below I’ve depicted two customers: one named “Sell-to Customer” and the other named “Bill-to Customer.” These are two normal customer records that could have any customer name. I’ve named them as I have to help keep track of how I want to use them for demonstration purposes. There are no significant differences between these customers other than their emails addresses and how I intend to use them on sales documents.
- Sell-to and bill-to customers are defined on sales documents as noted in the following screenshot:
- The screenshot below shows a Sales Invoice, but there are similar fields on all sales documents.
- Sell-to Customer’s Document Layout
- The Sell-to Customer’s Document Layout is defined as shown below.
- The Document Layout page is accessed from the customer card’s Document Layouts menu option.
- Sell-to Customer’s Email
- The Sell-to Customer’s Email is specified directly on the customer card, like shown below.
- Bill-to Customer’s Document Layout
- The Bill-to Customer’s Document Layout is defined as depicted below.
- Bill-to Customer’s Email
- The Bill-to Customer’s Email is specified directly on the customer card, like shown below.
- There’s an odd nuance when the Sell-to Customer’s Email address is used. This email value is determined at the time the Sales Document is created and will be passed down to the Posted Sales Invoice, unless it’s manually updated (as allowed on a Sales Order). This is different than all other email addresses. All other email addresses are identified when the email is generated.
- Example: Whenever a new Sales Document is created, the Sell-to Customer’s Email address is immediately written to the Sales Header table’s Sell-to E-Mail Address field. If the Sell-to Customer’s Email Address changes after the sales document is created, the email value on the sales document is not updated.
- Another odd nuance surrounding the emailing of Posted Sales Invoices is that the Email value presented under the Sell-to group of the Posted Sales Invoice page is never used when sending invoices by email. This email value is just a presentation of the current Email field value sitting on the Sell-to Customer’s Contact record.
- Notice in the screenshot below that the Sell-to E-Mail field value on the Sales Invoice Header table is different than the Email address presented on the page. This is because, as noted above, the Sell-to E-Mail field value is determined at the time the sales document is originally created.
- In the scenario in the screenshot below, as long as there isn’t a Sell-to Customer Document Layout configuration (that would take priority over the Sell-to E-Mail value), the email would be sent to the OldSell-toEmail@Customer.com address. Again, the Email value presented on the Posted Sales Invoice page is never used.
9. If you need the ability to manually specify the target email, you can do this on Sales Orders, but not on Sales Invoices. Sales Orders allow you to edit the Sell-to Email field, where the Sales Invoices do not.