Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

Posting Invoice from Sale order lines directly

Posted on by 100

Hi,

Can anyone help me  with small bit of C/AL code to Call Sales Posting CU directly from Sale Order line after filling Qty to ship/Qty to Invoice.

I would like to create invoice directly.

I want run this set of code in a batch program.

Please help

Warm Regards

Kris

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: Posting Invoice from Sale order lines directly

    Add the code in the OnValidate of Qty. to Ship field on the sales line the following code

    If "Qty. to Ship" <> 0 THEN BEGIN

      GetSalesHeader;

      SalesPost.RUN(SalesHeader);

    END;

    Where SalesPost is the of type Codeunit 80.

  • KrisMuthy Profile Picture
    KrisMuthy 100 on at
    RE: Posting Invoice from Sale order lines directly

    100% , I have only one line in sale order.  Just I am filling quantity (qty to ship) using batch job.   immediately  need to post and make qty-to ship to zero and again fill quantity and post.

    directly posting sales invoice without any dialog.

    Warm regards

    Kris

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: Posting Invoice from Sale order lines directly

    Do you want to post the sales order as soon as you enter the qty. to ship or invoice? do you want to post only that particular line? what is the issue of using sales post action?

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans