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
*This post is locked for comments
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.
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 ?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156