When sending a report via email, it is always more personal and friendly if you address the contact person of the recipient company directly at the beginning of the email body, like: “Dear John”. For this purpose, we have introduced the Custom placeholder @CustContactName@.
In this forum post, we will explain which data needs to be entered in D365F&O for different reports to ensure that the @CustContactName@ placeholder is resolved correctly. So, let’s start from the beginning.
We use the custom placeholder @CustContactName@ in the email body when configuring the Docentric Email print destination settings for a report that we want to send to a customer via email. An example of such a configuration is shown in the image below.
For all the reports mentioned in the rest of this forum post, we will assume that the Docentric Email print destination settings are configured with the @CustContactName@ placeholder in the email body.
The Docentric form – Report Placeholders displays all Docentric placeholders. We can open this form in the Docentric workspace by selecting the Related menu and then navigating to Report placeholders → All report placeholders, as shown in the image below.
If we apply a filter on the Placeholder column with Placeholder = CustContactName, the result will show all reports that support this placeholder.
Please pay attention to the DSP class in the right-most column, as the placeholder is implemented in it, so you need to select it in the Docentric report setup for the corresponding report, for this placeholder to be correctly resolved.
In this forum post, we will describe how the placeholder @CustContactName@ is resolved for some of the reports shown in the previous image. We have grouped the methods of resolving the placeholder into three groups.
Group 1:
Source is Contact field on Sales Order header.
If changed before posting the report, the new value is considered.
If changed after posting the report, the new (modified) value is taken when resolving the placeholder.
An exception rule: If changed after posting the report Sales Invoice, the last value before posting is used.
Report
- Sales Order Confirmation
- Sales Packing Slip
- Sales Quotation
- Sales Invoice
Group 2:
Source is Contact field on Free text Invoice header.
Once you post the Free text Invoice, the last contact information will be used and cannot be changed after posting.
Report
- Free text Invoice
Group 3:
Source is Primary contact field on Customer.
Even if the field value is changed after posting, the new (modified) value is taken when resolving the placeholder.
Report
- Project Invoice (all versions)
- Bill of Lading
- Customer account statement
- Collection letter
Here, we have described the behavior of the most commonly used reports, and we hope you now have an idea of where to look for the source of this placeholder in other reports that we haven’t covered here.
Helpful Note:
If the selection form for defining the Primary contact on the customer is empty, it means that no contact has been defined for this customer. You can add a contact on the customer details form by selecting Customer → Accounts → Add contacts.