Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Unable to print the comment in TO

Posted on by 1,835

Dear Experts,

In my transfer order, in line section have many items. I have write the different comments for every line.
I have write the code for print the comments. But it is not properly working. first line item comments is printing for every items.

Please help me to rectify the codes.

///Comments Printing
CLEAR(TxtTOComntL);
RecTOCmnt.RESET;
RecTOCmnt.SETRANGE("Document Type",RecTOCmnt."Document Type"::"Transfer Order");
RecTOCmnt.SETRANGE("No.","Transfer Header"."No.");
RecTOCmnt.SETRANGE("Document Line No.","Transfer Line"."Line No.");
IF RecTOCmnt.FIND('-') THEN BEGIN
REPEAT
TxtTOComntL := TxtTOComntL+ ' '+RecTOCmnt.Comment;
UNTIL RecTOCmnt.NEXT=0;
END;

Here,

RecTOCmnt = Inventory Comment Line
TxtTOComntL = It is the text type variable length is 1024

7043.test01.png

*This post is locked for comments

  • manish.yadav Profile Picture
    manish.yadav 1,835 on at
    RE: Unable to print the comment in TO

    Dear Sir,

    Thank you for your reply.

    I have write the code on

    Transfer Line - OnAfterGetRecord() Trigger

    After addition of group with Line No. Problem is resolved. Thank you again for write indication.

    Please close this thread.

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Unable to print the comment in TO

    Have you created a separate group row for printing the comments ? if so what is the filter you have applied for that group, you need to make sure you have same header no. and line no. filter for the group. Other thing where did you add the above code in which trigger ?

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans