Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

DateFormula In Dynamic nav

(1) ShareShare
ReportReport
Posted on by 21
Hi all,
             I have a doubt regarding date Formula, I have two field One Is date Field , Another one is Dateformula Field , 
here how to add or (Sum)  these field & Store another One variable..
i have write code , Its Doesn't Work ...
Correct by code ...
Kindly help me ..
 
saleshdr.RESET;
saleshdr.SETRANGE("No.",SLine."Document No.");
IF saleshdr.FINDSET() THEN BEGIN
  REPEAT
  recItem.RESET;
  recItem.SETRANGE("No.",SLine."No.");                                                           // ETDdate := dateformula field..   & First approval Date  := date field ..
  IF recItem.FINDSET() THEN BEGIN
     ETDdate := recItem."Lead Time Calculation";
    Sline.ETD := CALCDATE(saleshdr."First approval date", ETDdate);
    SLine.MODIFY;
END;
UNTIL SLine.NEXT = 0;
END;
 
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    Khushbu Rajvi. 5,234 on at
    DateFormula In Dynamic nav
     SLine.ETD := CALCDATE(ETDdate, saleshdr."First Approval Date"); // Correct usage of CALCDATE
          
  • gdrenteria Profile Picture
    gdrenteria 12,546 Most Valuable Professional on at
  • Noha.Mbi Profile Picture
    Noha.Mbi 34 on at
    DateFormula In Dynamic nav
    Hi,
    kindly flip the parameters from  this 
    Sline.ETD := CALCDATE(saleshdr."First approval date", ETDdate);
    to  
    Sline.ETD := CALCDATE(ETDdate,saleshdr."First approval date");
     
     
    and check that that item has a lead time calc 

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans