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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to add the days in date filed in nav 2016

(0) ShareShare
ReportReport
Posted on by

Hi friends,

I am having doubt in date calculation i want to send a mail after completed 5 days of due date, but i now how to calculate please can any tell any suggestions.

this is my code, i have taken due date from customer ledger entry table in my codeunit i need to send a mail after completed of 5 days i i dont have any idea about that. please tell me how to achieve this.

cust.RESET;
customerLedgerTable.RESET;

customerLedgerTable.SETRANGE("Customer No.",No);
IF customerLedgerTable.FIND THEN

test := customerLedgerTable."Due Date";
EVALUATE(datetest,'5D');

datecalculation := test '+'+datetest;

UNTIL customerLedgerTable.NEXT =0;

Thank you

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    You can sue the CALCDATE function:

    msdn.microsoft.com/.../dd301368.aspx

    CALCDATE('+5D',YourDate);

  • Community Member Profile Picture
    on at

    Hi Stefano

    Thank you so much for your reply i want to send a mail after completed 5 days of due date automatically

    eg:

    customer ledger entry table .due date :=10/04/10;

    CALCDATE('+5D',customer ledger entry table .due date);

    Answer := 15/04/10;

    now i can add 5d to due date  but i need to send a email after completed 5 days of due

    date automatically i dont know how to give a condition for that, please give any idea

    Thank you

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    You can check if the Due date is due and send the email, something like:

    DueDate := CALCDATE('+5D',customer ledger entry table .due date);

    if DueDate < TODAY then

     //Send email by using Mail codeunit

  • Community Member Profile Picture
    on at

    Hi Stefano,

    thank you so much for your reply.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans