Use Custom placeholders in Print Destinations in Docentric AX Free Edition

No matter if you are using Docentric AX Free Edition or the full product version, you can use Standard and Custom placeholders in your print destination settings such as Email body, Email attachment name, Email subject, File output name, Azure blob storage container name, etc.

Let’s say that you want to use Sales ID and Customer Name in your Email body when emailing the Sales order confirmation report.

You can achieve this by using “dynamic” Standard placeholders including @FIELD_XXX@ and @METHOD_XXX@. There is also @PARAMETER_XXX@ that can be bound to a report parameter (e.g. @PARAMETER_DocumentTitle).

These are fields and display methods from the context execution record of an executing report, which is a record from the CustConfirmJour table in case of the Sales order confirmation report.

 

There is one limitation with this approach though. If you run the report from the Sales order confirmation form (the journal form), then everything works fine. But if you run the report from the Confirm sales order form (the posting form), this will not work, because the corresponding journal record is not created yet.

To overcome this problem, we will introduce Custom placeholders for this report. In order to do so, we need to register this report in Docentric report setup, to create a custom Docentric DSP (Data source provider) class for this report, and assign it to the report in Docentric report setup.

We recommend you to install an additional model containing so called Docentric SSRS Replicas that already provide DSP classes and Custom placeholders for common reports such as Sales invoice and Purchase order. Learn more >>

In Visual Studio create a new class with the following implementation:

Notice that this way we have defined four custom placeholders:

  • SalesId
  • CustAccount
  • CustName
  • CustContactName

Build your class and start D365FO. Navigate to Organization administration -> Docentric AX -> Reports and open the Docentric report setup form. Register Sales order confirmation (i.e. the corresponding SalesConfirm.Report SSRS report design) as Docentric report. Turn on the Use only print destinations flag.

 

In the Data source provider class tab in Docentric report setup select the created DocSalesConfirmDSP_CustomPlaceholders class.

 

Navigate to Accounts receivable -> Setup -> Forms -> Form setup and open Print management setup. For the Sales order confirmation report set up the Email print destination settings as following.

When you click the Use print management button on the Sales order confirmations form, the email is sent to those customer's contacts of type Email, which has the Business purpose assigned.

 

See also

Read more about Email's Purposes >>
Learn more about Custom placeholders >>
Learn more about Standard placeholders >>

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Docentric respects your privacy. Learn how your comment data is processed >>

Docentric respects your privacy. Learn how your comment data is processed >>