hi superiors
i have the following question as shown below.
Report to enter the Account No. in "Consol. Debit Acc." and "Consol. Credit Acc." for all acounts in chart of Accounts
i have taken a new report
with data item
g/l account
property:processing only=yes;
i have written the code
onafter get record()
IF "G/L Account".FIND THEN
BEGIN
REPEAT
"G/L Account".INIT;
"G/L Account"."Account Type":="G/L Account"."Account Type"::Heading;
"G/L Account"."Consol. Debit Acc." :="G/L Account"."No.";
"G/L Account"."Consol. Credit Acc." :="G/L Account"."No.";
"G/L Account".INSERT;
"G/L Account".RESET;
UNTIL "G/L Account".NEXT=0;
END
ELSE
MESSAGE('no records');
it was throwing the error,i was week at coding .can you suggest me the process where i have done wrong
thank you
error:
the g/l account entry already exists
with no :1000
0
Comments
Just assign the values to field in OnAfterGet Record trigger and modify the record.
no need to find the record etc..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
thanks for giving reply .this code helped me .
"G/L Account"."Consol. Debit Acc." :="G/L Account"."No.";
"G/L Account"."Consol. Credit Acc." :="G/L Account"."No.";
"G/L Account".MODIFY;
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav