web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Auto post Sales Invoice

(0) ShareShare
ReportReport
Posted on by

Hi All,

We have created the following:

1. Webservice to create sales invoice (Sales invoice created successfully with status "Open")

2. Job Queue to post Sales Invoice in the background (Sales invoice was scheduled and post successfully)

However to get from Step 1 to Step 2, user has to manually click "Post" in Sales Invoices page (as shown below).

2318.Sales-Invoice-Posting-automation.PNG

How can I automate the above step, so that the Sales Invoice posting can be automated without any human intervention.

Thank you.

Regards,

Susy

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Yogesh Kulkarni_ Profile Picture
    1,762 on at

    You can call a code on Post functionality of Sales Invoice(s) in a Job Queue to get scheduled.

    Please make sure, you are releasing Invoice well before posting.

    -Yogesh Kulkarni
    Please verify, if you find answer helpful.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    Check this feature of batch posting

    msdn.microsoft.com/.../hh168304(v=nav.90).aspx

  • Community Member Profile Picture
    on at

    Hi Yogesh,

    We need to automate the Releasing + Posting. When I click Post in Sales invoice screen, the function is actually doing both.

    I test using Job Queue to automate the following codeunits to post the sales invoice:

    414 Release Sales Document

    88 Sales Post via Job Queue

    I get the below error message:

    CodeUnit 414 - Record(472) is not compatible with Codeunit.Run(Record(36)).

    CodeUnit 88 - Record ID to Process must have a value in Job Queue Entry: ID={2850A9F5-C77D-489C-B38D-BCDC18512506}. It cannot be zero or empty.

    88-Error-Message.PNG

    88-Error-Message.PNG

  • Community Member Profile Picture
    on at

    Hi Amol,

    The batch posting process still needs someone to manually click Post Batch in NAV which we are trying to avoid.

    Regards,

    Susy

  • Suggested answer
    Rajasekhar@MS Profile Picture
    5,569 on at

    Hi

    You can setup a job queue to post sales Orders, refer the below link.

    msdn.microsoft.com/.../hh879081(v=nav.90).aspx

  • Community Member Profile Picture
    on at

    Hi Raja,

    I have done that. However, that still requires user to click "Post" in the Sales Invoice screen.

    Regards,

    Susy

  • Suggested answer
    Rajasekhar@MS Profile Picture
    5,569 on at

    Hi

    Are you receiving any error using job queue, can you check the job queue entries for the error details?

  • Community Member Profile Picture
    on at

    Hi Raja,

    no error in job queue.

    The Sales invoice process currently is as below:

    1. Webservice create Sales invoice with status = "Open"

    2. User click "Post" or "Post Batch" on Sales invoice list screen

    3. Invoices are scheduled to post and post in background.

    What I am after is a way to automate Step 2.

    Regards,

    Susy

  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    Create a codeunit/report.

    filter on Sales Invoices with Open

    and write code in object which exactly does same thing as under Post button.

    make sure that there are no user interfaces in process.

  • Verified answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    add the above created report/codeunit in Job Queue to execute in intervals as per your requirement.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans