Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

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

Posted on by 1,835

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
    Suresh Kulla 43,745 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
    manish.yadav 1,835 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
    Mohana Yadav 59,139 Super User 2024 Season 2 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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans