Setting Up a Mail Template for Document Approval Notifications

Setting Up a Mail Template for Document Approval Notifications

  • Comments 11

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

 

The email template is an HTML file that you can export from Microsoft Dynamics NAV, edit in Word, for example, and then import back to the program where it then defines the content of approval notifications sent between users in the database.

 

The following default notification email template is shipped with the standard product:

default template

The parameters represent the following variables when used for sales approval notifications:

The parameters represent the following variables when used for purchase approval notifications:

A sales approval notification based on the default template looks approximately as follows:

Note: The program automatically inserts variables in the notification according to the approval action and document type that it notifies about.    

 

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 procedure.

 

To Set Up a Mail Template for Document Approval Notifications

 

Begin by exporting the default mail template to a folder on your computer.

 

1.      From the navigation pane, click Administration, and then click Application Setup

2.      Click Document Approval, and then click Approval Setup.

3.      In the Approval Setup window, click Mail Templates, point to Approval Mail Template, and then click Export.

4.      Give the HTML file a name, such as “notification mail.htm”, and save it in any folder.

 

Proceed to edit the template to define which fields to include in approval notifications in your company.

 

1.      Locate the exported template file.

2.      Right-click on the file, point to Open with, and then click Word (or Note Pad).

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

4.      Save and close the HTML file.

 

Finish by importing the changed template.

 

1.      From the navigation pane, click Administration, and then click Application Setup

2.      Click Document Approval, and then click Approval Setup.

3.      In the Approval Setup window, click Mail Templates, point to Approval Mail Template, and then click Import.

4.      Select the HTML file you edited in the previous steps, and then click OK.

5.      Click Yes to overwrite the existing mail template in the database.

 

Overdue Mail Template

 

To define the content of reminder emails to users concerning overdue approval actions, follow the same procedure as for notification mails, but begin by clicking Mail Templates, and then point to Overdue Mail Template in the Approvals Setup window.

 

- Soren Groes-Petersen

Leave a Comment
  • Please add 5 and 2 and type the answer here:
  • Post
  • Is there a way to include the requester id? Thanks!

  • The list of available variables is coded into the approvals system and can only be extended by a developer.

    The user requesting approval is reflected in the From line of the email as well as in the Sender ID column of the Approval Entries window.

  • Hi,

    Can we add picture?

  • The email notification is sent from the system with no user intervention from an ‘unmonitored alias’, so the user cannot attach an image at that point. Instead you would need to extend the feature (this requires developer rights) in order to be able upload the image in a new field on the approval record, which is then processed by the approval email system and the image is attached.

  • Hello everyone,

    Where can we add new paramètres? In which Table o CodeUnit?

    Thank you!

  • @Wely, that should be easy to find..

    I followed the "guide" Above...

    1) Typed Approval Setup in the Search Menu

    2) Help, About and got the Page ID = 656

    3) Went into the Development client.

    4) Design on Page 656

    5) View, Page Actions and found the Line with the caption "send overdue...." and pressed F9

    6) Had a look at the code.. and noticed the ApprMgtNotification and

    6) Went into View, Globals and found the above variable - A codeunit with ID = 440

    7) Exited the Page

    8) Went into design of Codeunit 440

    9) Searched (CTRL+F) for 18 and found the Function FillSalesTemplate

    That's it :D

    Have fun changing the code

  • Thank you Pallea for your response.

    Please can you tell me when and where the fonction FillPurchaseTemplate is called ?

  • Thank you Pallea fo you response :)

    Please can you tell me when and where the fonction FillPurchaseTemplate is called?

  • The FillPurchaseTemplate is called only in Codeunit 440 but is being used but other functions in Codunit 440 and 439, and called in a number of places. One location is at

    Company Name/Departments/Purchase/Order Processing/Approval Entries

    Are you a NAV developer working for a reseller or ISV? If yes then you have access to export the entire sourcecode as text.

    The text file can then be imported into a Source Analyzer Tool like

    Mergetool.com

    Best practises Analyzer

    Source Control

    or others

    Also look out for the coming Navgate in November. It looks awesome.

    My favorite is mergetool.com - take a look at the website and watch some of the youtube video clips on this matter.

    With one of these analyzer tools you will be able to find out where code is being used.

  • Hello,

    Where can I locate the parameters (%1, %2 ...) for approval document mail ?

    Regards,

  • @Jean...Same location as the rest...Codeunit 440!

Page 1 of 1 (11 items)