web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Store - Indent.

(0) ShareShare
ReportReport
Posted on by 1,893

Is there any functionality ...If I released the Indent ....mail automatically send to concern person for approval request.

How to add mail function in Store  - Indent.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: Store - Indent.

    Hi Manish,

    Is the Store-Indent a customized functionality?

    Anyways, you can use SMTP MAIL (CU 400) or Mail CU (CU 397 - using Outlook) for sending mail.

    Here is the guide.

    Link [1]: msdn.microsoft.com/.../hh179541%28v=nav.70%29.aspx

    Link [2]: msdn.microsoft.com/.../dn951539%28v=nav.90%29.aspx

    Hope it helps.

  • manish.yadav Profile Picture
    1,893 on at
    RE: Store - Indent.

    Dear Nareshwar sir, can you elaborate it steps by steps, how to use this function -

    SMTP MAIL (CU 400) or Mail CU (CU 397 - using Outlook) in my store page for sending the mail..I need to add button on indent page...

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Store - Indent.

    Indent is not standard functionality and hence you need to go for customization.

    Refer our earlier thread for sending mail using SMTP or Mail Codeunit.

  • Verified answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: Store - Indent.

    Hi Manish,

    I can only explain the skeleton of how it works.

    When a user clicks the 'Release' Page Action, You put this code block below to send an email.

    I used codeunit 400, in there you have CreateMessage() function. Call the function with appropriate parameters.

    The function signature must look like this.

    Codeunit400.CreateMessage(SenderName,SenderAddress,Recipients,Subject,Body,HtmlFormatted);.

    Also, make sure that SMTP Mail Setup (Table 409) has been configured. You can use a simple Google SMTP Server for testing: https://www.siteground.com/kb/google_free_smtp_server/

    Please understand that this is just a skeleton, not the entire solution. There can be many deviations according to your business need.

    Hope it helps.

  • manish.yadav Profile Picture
    1,893 on at
    RE: Store - Indent.

    I have start the functionality for sending the email on purchase order..the code is:

    Mail.CreateMessage('manish adav','manish.yadav@mku.com','manish.yadav@mku.com','Hello','Please approve this document',FALSE) ;

    Mail.AddCC('prachi.gupta@mku.com');

             Mail.AddBCC('santosh.chaurasia@mku.com');

             Mail.AddAttachment('E:\purchase register.txt');

             Mail.Send;

             MESSAGE('Mail Sent');

    it is working fine, but I have a one concern I want to send the document   detail like doc no, and its date, qty , rate ,vendor detail and like this....

    Please suggest me Sir, I m waiting for your reply

  • Verified answer
    Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: Store - Indent.

    Hi Manish,

    For that, you have to construct the body of the mail by concatenating the fields you wanted.

    Let's say you wanted to send Document No., and the Posting Date of the Purchase Order.

    First, construct the string.

    stringBody = STRSUBSTNO('Please approve Document No %1, posted on %2', PurchHeader."No.", FORMAT(PurchHeader."Posting Date"));

    (If you are writing this on Purchase order Page Action, then you can use Rec."No." instead of PurchHeader."No.")

    Then call your CreateMessage() function with newly constructed string on the body parameter.

    Mail.CreateMessage('manish adav','manish.yadav@mku.com','manish.yadav@mku.com','Hello', stringBody ,FALSE) ;

    Likewise, you can construct stringBody by adding the fields you wanted.

    Additionally, instead of using a new Text variable, you can use the Text Constants (It is your call).

    Hope it helps.

  • manish.yadav Profile Picture
    1,893 on at
    RE: Store - Indent.

    hello dear

    i m writing this code in following form

           Mail.AppendBody((STRSUBSTNO('Purchase Order No. %1, Order Date :- %2', Rec."No.", FORMAT(Rec."Order Date"))));

           Mail.AppendBody((STRSUBSTNO('Expected Receipt Date %1',FORMAT(Rec."Expected Receipt Date"))));

           Mail.AppendBody((STRSUBSTNO('Due Date %1',FORMAT(Rec."Due Date"))));

           Mail.AppendBody((STRSUBSTNO('Quantity %1',PurchLine.Quantity)));

           Mail.AppendBody((STRSUBSTNO('Vendor Name :- %1', "Buy-from Vendor Name")));

    now it is working fine

    but the output is :

    Please approve this document...>  Purchase Order No. PO-101-IOM-15-01-047, Order Date :- 27-01-15Expected Receipt Date Due Date 24-01-15Quantity 0Vendor Name :- Jyoti Industrial Corporation

    are u getting my point?

    line is not breaking here

    all r in the single line

    i want it line by line

    i means

    po no

    po dat

    qty

    vendor name

    due dt

    I m waiting for your response ....

    thank u for your best support

  • Nareshwar Raju Vaneshwar Profile Picture
    5,596 on at
    RE: Store - Indent.

    Hi Manish,

    Try adding a '\' when you want to break to the next line.

    For example,

    MESSAGE('This is the first line \This is the second line');

    Hope it helps.

  • manish.yadav Profile Picture
    1,893 on at
    RE: Store - Indent.

    still the same result:

                           Please approve this document...> Purchase Order No. PO-101-EX-15-02-002, Order Date :- 05-02-15Expected Receipt Date Due Date 05-02-15Quantity 0Vendor Name :- M. S. International

    all in single line

    how to add  '\'  in my code: can u fit it:

    Mail.CreateMessage('manish yadav','manish.yadav@mku.com','manish.yadav@mku.com','Hello','Please approve this document...>  ',TRUE) ;

            Mail.AppendBody((STRSUBSTNO('Purchase Order No. %1, Order Date :- %2', Rec."No.", FORMAT(Rec."Order Date"))));

            Mail.AppendBody((STRSUBSTNO('Expected Receipt Date %1',FORMAT(Rec."Expected Receipt Date"))));

            Mail.AppendBody((STRSUBSTNO('Due Date %1',FORMAT(Rec."Due Date"))));

            Mail.AppendBody((STRSUBSTNO('Quantity %1',PurchLine.Quantity)));

            Mail.AppendBody((STRSUBSTNO('Vendor Name :- %1', "Buy-from Vendor Name")));

    Mail.Send;

    MESSAGE('Mail Sent');

    Waiting for the best result.

    manish

  • manish.yadav Profile Picture
    1,893 on at
    RE: Store - Indent.

    sir I will request u, please verify me my coding is in correct way or not...

    Regards,

    manish yadav

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#2
SC666 Profile Picture

SC666 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans