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)

NAV Dev - Header Comments and Item Line Comments

(0) ShareShare
ReportReport
Posted on by

Hello People

Question 1:

So I have created a Comments Field in Page 50 Purchase Order in the General Section and Now I want it to show on the report when I print it.

Upto now I have created a created a field but it doesn't pull through any details. ' I've also created this field in Table Purchase Header.

Can anyone help?

Question 2:

Customer asked to place Comments under each Item Line but not as another Item Line(without setting a type) as they will be using Purchase Reqs and aparently they will pick the Comments made in Item Line as Items.

Can anyopne help with that?

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    1) Is your report printing before posting or after posting ? If it is after posting the purchase order then you need to add field in Pur.Inv header table also with same id or need to write program to show it from purchase header  . Why not using standard application comment ?

    2) You can user standard NAV comment to key in the comment for each line.

  • Suggested answer
    CDsilva Profile Picture
    4,188 on at

    Hi,

    Use standard code Purch. Comment Line (ID 43)

    Create two global variables Comments and Comm in your report. code as below and use this variable in your report.

    OnAfterGetRecord() //Purchase Header

    PurchCommentLine.RESET;

    PurchCommentLine.SETRANGE("Document Type",PurchCommentLine."Document Type"::Order);

    PurchCommentLine.SETRANGE("No.","Purchase Header"."No.");

    IF PurchCommentLine.FINDFIRST THEN

     Comments:=PurchCommentLine.Comment;

    OnAfterGetRecord() //Purchase Line

    PurchCommentLine.RESET;

    PurchCommentLine.SETRANGE("Document Type","Purchase Line"."Document Type"::Order);

    PurchCommentLine.SETRANGE("No.","Purchase Line"."Document No.");

    PurchCommentLine.SETRANGE("Document Line No.","Purchase Line"."Line No.");

    IF PurchCommentLine.FINDFIRST THEN

     Comm:=PurchCommentLine.Comment;

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