Get Next Journal Entry Number

Microsoft Dynamics GPA colleague is currently working on some development for Microsoft Dynamics GP and needs to create a journal.

I did some digging around the company database looking for the correct way to get the next Journal Entry number and found a function called glGetNextJournalEntry.

A little work and I was able to supply the following to the developer for him to wrap into a stored procedure to get the Journal Entry number and make sure there were no issues in GP;

Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant ( This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
DECLARE @l_tINCheckWORKFiles tinyint = 1 DECLARE @I_iSQLSessionID int = USER_SID() DECLARE @O_tOUTOK tinyint DECLARE @IO_iOUTJournalEntry int = 1 DECLARE @O_iErrorState int EXECUTE glGetNextJournalEntry    @l_tINCheckWORKFiles    ,@I_iSQLSessionID    ,@IO_iOUTJournalEntry OUTPUT    ,@O_tOUTOK OUTPUT    ,@O_iErrorState OUTPUT SELECT @IO_iOUTJournalEntry AS 'NJRNLENT', @O_tOUTOK AS 'OUTOK', @O_iErrorState AS 'ERROR'

Can ISC Software Solutions help?

ISC Software Solutions are UK and Ireland based experts on Microsoft Dynamics GP. If you’d like to speak to someone about support, consultancy, upgrades, implementation, development, GP Elementz add-ons or portals, or anything else Dynamics GP related, you can use the form below.

Your Name (required):
Your Email (required):
Enquiry message:

What should we write about next?

Your Name (required) –
Your Email (required) –

5 thoughts on “Get Next Journal Entry Number

  1. Pingback: Comment
  2. Pingback: Comment
  3. Pingback: Comment
  4. Pingback: Comment

Leave a Reply

Your email address will not be published. Required fields are marked *