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)

Syntax Error

(0) ShareShare
ReportReport
Posted on by 3,099

Hi

 IN the below code i am getting Syntax Error in the IF condition


AIHdr.SETRANGE("No.","GP No.");
IF AIHdr.FINDFIRST THEN BEGIN
GPDt := AIHdr."Posting Date";
PNo := AIHdr."GP No.";
END

Thanks

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Marcellus Profile Picture
    2,735 on at

    Hello,

    add a semi-colon after the END.

    I think if you don't have code or only have comments after you don't get a compiler error but if there is any code afterwards you will get a syntax error.

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)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans