Hello experts,
The requirement was to copy first 5 lines of Narration stored in "Posted Narration" table (customised table) to a new field created in "G/L entry" Table. The field in "Posted Narration" table correspond to G/L entry are "Document No. & Posting Date". Now I made a report with a button & made this code to run on button.
WITH lrc_glentry DO BEGIN
ltx_Narration := '';
lin_count := 0;
lrc_PostedNarration.SETCURRENTKEY("Document No.","Posting Date");
lrc_postednarration.SETRANGE("Document No.",lrc_glentry."Document No.");
lrc_postednarration.SETRANGE("Posting Date",lrc_glentry."Posting Date");
IF lrc_postednarration.FINDFIRST THEN
REPEAT
ltx_Narration := ltx_Narration + lrc_postednarration.Narration +'';
lin_count += 1;
UNTIL (lrc_postednarration.NEXT=0) OR (lin_count <= 5);
lrc_glentry.Narration := ltx_Narration;
lrc_glentry.MODIFY(FALSE);
END;
Now the error shows "G/L Entry Entry No. '0' does not exist"
What Am I missing?
0
Answers
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
If so shall I make a report based on G/L Entry as dataitem instead of FOrm?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
IF lrc_glentry FINDFIRST THEN
END;
should work i guess???
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
WITH Statement
Just a happy frood who knows where his towel is