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.
*This post is locked for comments