Dear all,
Am creating an Item Journal in AL getting data from another system and its inserting data in the database table but unfortunately I can't see the journal itself in the item Journals page. what could be the issue?.
Dear all,
Am creating an Item Journal in AL getting data from another system and its inserting data in the database table but unfortunately I can't see the journal itself in the item Journals page. what could be the issue?.
Bilal Haider,
Sorry for the misunderstanding. I have put the the piece of code you did on number series, but when I ran my routine of creating item Journal, The system freezes and open the al file that created the default NoSeriesManagement codeunit and the breakpoint (highlighted in yellowish thick line) occurs as per the black screen I had shared earlier.
I do not understand what are you telling above.
Thank you for a quick response.
I have done so but I got a breakpoint below on
Inventory Setup numbering has nothing to do with this.
Hi,
I have created a new Item Batch and given it a No. Series. Then used this two line code and it worked perfectly fine. Please check that are you getting Item Journal Batch properly line no 1 in image.
Code:
ItemJournalBatch.GET('ITEM','ISSUE');
DocNo := NoSeriesManagement.TryGetNextNo(ItemJournalBatch."No. Series",WORKDATE);
Regards,
Bilal Rai
Are'nt you using DEFAULT as Item Journal batch ?
Bilal Rai,
I have the message and its actually empty for the document number. Below is the Item Batch am using together with its number series. However, I have gone to Inventory set up and at the numbering section, I didn't see any option matching Item Journal transaction. The number series DOC you see below is set at number series section on administration.
Regards,
RomRyan
You are using right code to get next no based on No. Series. Can you show output by using MESSAGE function to see what is Document No after execution of NoSeriesMgt.TryGetNextNo. Also check that if you have got the ItemJnlBatch correctly. Have you used GET function for that ?
Also show the No series that you are saying is attached to Item Journal. One more thing do you have multiple Item Journal Templates or a only one ?
Regards,
Bilal Rai
Hi RomRyan,
If you are already using the code that you have written above then you dont need to use SetupNewline function. It uses the same code that you have specified.
Regards,
Bilal Haider
Bilal Rai,
Thank you so much for your response.
The below code cannot append the next document number while my Journal Batch name 'Default' has a number series attached to it. On the normal Item Journal, the next Document number is defaulted but the code can't. Sorry, how can I use SetupNewLine function to achieve the same.
If ItmJnlBatch."No. Series" <> '' then begin
Clear(NoSeriesMgt);
ItmJnl."Document No." := NoSeriesMgt.TryGetNextNo(ItmJnlBatch."No. Series",WorkDate());
End;
Regards,
RomRyan
André Arnaud de Cal... 291,642 Super User 2024 Season 2
Martin Dráb 230,371 Most Valuable Professional
nmaenpaa 101,156