Journal vouchers were created in a codeunit using No. series mgmt. routine using function TryGetNextNo(jnlBatch.“No. Series”,TODAY). But the no. is not incremented for the subsequent vouchers . If I use GetNextNo function with boolean set to TRUE, the no. is incremented but posting fails. Actually, the no. shd be increased in no. series line table only after posting is thru successfully. How to resolve this ?
Hi, Try this function InitSeries(DefaultNoSeriesCode : Code;OldNoSeriesCode : Code;NewDate : Date;VAR NewNo : Code;VAR NewNoSeriesCode : Code Bye
Hi I think you should check if Journal vouchers already has some record or not. If HAS Then “No.” := INCSTR(“No.”) ELSE “No.” := TryGetNextNo(jnlBatch.“No. Series”,TODAY) Hope this will help you