Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How can we stop copy comment in production order header from sales order.?

(0) ShareShare
ReportReport
Posted on by 1,893

Dear Experts,

In our sales order, we inserting the comment in everyline(every sales line). When the sales order is released, we make a production order. Here, in production order have a field called as "Source type", here we select the sales header and put the sales order no. and refresh the production order through refresh the production order btn available in prodction order. lines are automatically filled in prod_order_line. and sales comment line are inserting in pord_order comment line.

Why sales comment line are showing in production order ribbon comments. if in case we change the sales order no, it is always showing the error message. my main concern is why line comment are showing in header.

I have debug the code and found that in codeunit no....99000787 there have a function name is
"CopySaleLineComments"

Code are below:

LOCAL CopySaleLineComments(SalesLine : Record "Sales Line";ProdLine : Record "Prod. Order Line")
SalesCommentLine.RESET;
SalesCommentLine.SETRANGE("Document Type",SalesLine."Document Type");
SalesCommentLine.SETRANGE("No.",SalesLine."Document No.");
SalesCommentLine.SETRANGE("Document Line No.",SalesLine."Line No.");
IF SalesCommentLine.FINDSET THEN BEGIN
ProdCommentLine.INIT;
ProdCommentLine.Status := ProdLine.Status;
ProdCommentLine."Prod. Order No." := ProdLine."Prod. Order No.";
ProdCommentLine."Prod. Order Line No." := ProdLine."Line No.";
ProdCommentLine."Line No." := SalesCommentLine."Line No."; 
ProdCommentLine.Comment := SalesCommentLine.Comment;
ProdCommentLine.INSERT(TRUE);
END;

How can we stop copy comment in production order header ribbon comments. Screenshot are below.

2235.test01.png

1222.test02.png

2388.test03.png

*This post is locked for comments

  • Suggested answer
    Suresh Kulla Profile Picture
    47,789 on at
    RE: How can we stop copy comment in production order header from sales order.?

    Because we don't have a comment line table for the Production Order Line, so the comments you inserted into Prod. Order Comment Line are for the production order. The Line No. is ignored

  • manish.yadav Profile Picture
    1,893 on at
    RE: How can we stop copy comment in production order header from sales order.?

    Yes it is customized

  • Suggested answer
    Mohana Yadav Profile Picture
    60,232 Super User 2025 Season 1 on at
    RE: How can we stop copy comment in production order header from sales order.?

    is CopySaleLineComments standard function or customized? I didn't find it in 2018 database.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans