Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Answered

How to Customise Workflow Email Template In NAV 2018

Posted on by 240

Hi, All

I create Customize workflow for Req. Worksheet Page. But I have an issue of "Workflow Request on Email" it showing the "Line no of the table "Requisition Line (246)". I didn't find out how he gets the line of the workflow email template.

7115.5.png

I want to insert Item no, Qty and Amount in Email Workflow Template. 

Please Help me Out that Issue.

Thanks in Advance.

  • NeoMatrix Profile Picture
    NeoMatrix 240 on at
    RE: How to Customise Workflow Email Template In NAV 2018

    Thanks for Reply. It works fine. it shows Like

    2844.1.PNG

    I have written code for above like

      DATABASE::"Requisition Line":
        BEGIN
         DocumentType := RecRef.CAPTION;
          FieldRef  := RecRef.FIELD(50003);
          DocumentNo  := FORMAT(FieldRef.VALUE);
          FieldRef  := RecRef.FIELD(6);
          DocumentNo +=','+' Item :'+FORMAT(FieldRef.VALUE);
          FieldRef  := RecRef.FIELD(10);
          DocumentNo +=',Cost :'+FORMAT(FieldRef.VALUE);
         END;

    But I want to Print like That as standard shown as below image

    2844.1.PNG

    where am I going to Put the code for this?

  • Verified answer
    I Gusti Made Ari Profile Picture
    I Gusti Made Ari 3,590 on at
    RE: How to Customise Workflow Email Template In NAV 2018

    You need to custom for this. Inside codeunit 1510 "Notification Management" inside function "GetDocumentTypeAndNumber" , add following code inside the switch statement :

      DATABASE::"Requisition Line":
        BEGIN
          DocumentType := RecRef.CAPTION;
          FieldRef := RecRef.FIELD(5); //ItemNo Field Id
          DocumentNo := FORMAT(FieldRef.VALUE);
          FieldRef := RecRef.FIELD(10); //Direct Unit Cost Field Id
          DocumentNo += ',' + FORMAT(FieldRef.VALUE);
        END;


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans