Compartir a través de


How to: Modify Mail Templates for Document Approval Notifications

The mail notifications that are sent between users, according to the document approvals setup, are based on mail templates that define which fields and text to show in the email notification.

The mail template is an .html file that you can export from Microsoft Dynamics NAV, edit in Microsoft Word, for example, and then import back. The template defines the content of approval notifications that is sent between users.

The mail template consists of 18 variable parameters positioned in the following layout.

Template for doc. approval mail notifications

The parameters map to variables for sales approvals and purchase approvals, respectively, as described in the following table.

Parameter Variable

%1

Value of the Document Type field

%2

Value of the Document No. field

%3

Status text: 'requires your approval.','has been canceled.','has been rejected.' or 'has been delegated.'

%4

Text: 'To view your document, please use the following link:'

%5

URL Link to document.

%6

Value of APPLICATIONPATH

%7

Name of the Amount field

%8

Value of the Currency Code field

%9

Value of the Amount field

%10

Name of the Amount (LCY) field

%11

Value of the Amount (LCY) field

%12

Sales: Text: 'Customer' / Purchasing: Text: 'Vendor'

%13

Sales: Value of the Bill-to Customer No. Field / Purchasing: Value of the Pay-to Vendor No. Field

%14

Sales: Value of the Bill-to Name field / Purchasing: Value of the Pay-to Name field

%15

Name of the Due Date field

%16

Value of the Due Date field

%17

Sales: Text: 'Available Credit Limit (LCY)' / Purchasing: Text: 'Request Amount (LCY)' or blank if not a request for limits

%18

Sales: Value of the Available Credit Limit (LCY) field / Purchasing: Value of the Amount (LCY) field or blank if not a request for limits

Important

The variables are automatically inserted in the notification mail according to the approval action and document type.

If the default mail template for approval notifications does not fit your needs, you can export, edit, and import it as described in the following procedures.

To export the template

  1. In the Search box, enter Approval Setup, and then choose the related link

  2. On the Navigate tab, in the Mail Templates group, point to Approval Mail Template, and then choose Export.

  3. Name the .html file, such as notification mail.htm, and save it in any folder.

To modify the template

  1. Select the file that you exported. Open the shortcut menu, point to Open with, and then choose the editor you prefer, such as Microsoft Word or Notepad.

  2. Edit the template by adding, changing, or removing variables to define the notification content you want.

  3. Save and close the .html file.

To import the changed template

  1. In the Search box, enter Approval Setup, and then choose the related link

  2. On the Navigate tab, in the Mail Templates group, point to Approval Mail Template, and then choose Import.

  3. Browse to and select the .html file that you edited, and then choose the OK button.

  4. Choose the Yes button to replace the existing mail template in the database.

The procedure for modifying the templates for reminders for overdue approval actions is similar.

To modify the template for reminder mails

  1. In the Search box, enter Approval Setup, and then choose the related link.

  2. On the Navigate tab, in the Mail Templates group, point to Overdue Mail Template, and then choose Export.

  3. Select the file that you exported. Open the shortcut menu, point to Open with, and then choose the editor you prefer, such as Microsoft Word or Notepad.

  4. Edit the template by adding, changing, or removing variables to define the notification content that you want.

  5. Save and close the .html file.

  6. In Microsoft Dynamics NAV, import the template.

See Also

Concepts

Define an Approval Workflow