Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Posting Invoice from Sale order lines directly

(0) ShareShare
ReportReport
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,745 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,745 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans