Hello,
I'm doing some posting through gen jnl lines and mentioned codeunit, which has function called Code() and that piece of code in it:
IF NOT FIND('=><') THEN BEGIN
"Line No." := 0;
COMMIT;
EXIT;
END;
after that in debugger my document no. in my genJnlLine changes, i.e. from TEST/12/00001 to TEST/11/00199 (previous year no series and its last number) what causes error later on in posting, nav says, doc no. should be TEST/12/00001.
I totally can't figure out what is happening.
Can anybody help?
Thanks in advance
0
Comments
how did you filter the General Journal Line record before handing it of to Codeunit 13?
If your filters on the record point to another Journal line then the journal line you are handing to CU13, you will get an error.
For example:
My advice is check your code just before you call codeunit 13. The problem probably exist in that area.
Hope this helps,
Regards,
Willy
This is a left over from the DOS days, and really is not needed now. It was used to optimize latency in hard drives. In SQL it has no performance difference.
Take a look at the code, and see if you can replace it with FINDFIRST, FINDSET or FIND('-'). There may be a NEXT that you also need to change.