Automate Invoice Posting


first off I have done lots of searches and I have not found a solution, I am new to NAV, I wrote a codeunit to bring over data from a third party POS system into navision order processing screen, the data comes over fine, I can release it, then post with no errors.

what I want to do now however is to automate the process of releasing and posting these invoices, how can this be done? any help would be appreciated.


How and when you are running this codeunit to get the data?

Hi Dutch,

Maybe you can tell us which version you are using.

In Nav 4.0 you can use Job Scheduler whereas in NAV 5.0 and 2009 you can use Job queue. Both serve the same purpose actually _to schedule your job.

Basically there are 3 things need to be done here

  1. Create the job.
  2. Schedule the job in Job Queue
  3. Have Navision Application Server (NAS) installed with JOBQUEUE in parameter

From the requirement, there are two process involved, releasing and posting a document.

To release a Sales Doc, you can use codeunit 414 Release Sales Document.

To post a Sales Doc, you can either use codeunit 80 Sales-Post or report 296 Batch Post Sales Orders.

Depend on your design, you can combine above mentioned process into one job (create one codeunit and run it from Job Queue) or you can create two different jobs.



In support to Tony’s suggestion have a look here:

  • Posting Queue - Part 1
  • Posting Queue - Part 2

currently we run it manually, we will schedule it in due time

TR, you are pointing us in the right direction, gonna have a go at it come tomorrow and report back.

all is working fine thanks much.