Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

Auto creation of Sales invoice when we post shipment.

Posted on by Microsoft Employee

Hello,

I am stuck i one issue,please help.I want to make a functionality that when i post shipment ,It automatically creates sales invoice for that particular order.

*This post is locked for comments

  • Verified answer
    Ruben.Mejia87 Profile Picture
    Ruben.Mejia87 166 on at
    RE: Auto creation of Sales invoice when we post shipment.

    Hello Again,

    When developing new features, is very helpful to base this on an existing one which is similar.

    In this case, what I think can be very similar to your goal, is use the Codeunit 86 just as a base.

    I would create some new codeunits based on 86 and its relatives on the process.

    Obviously, there is not simple copy and paste, because this (86) creates a Sales Order from a Sales Quote. In your case, Create a Sales Invoice (as you said just Create, then is table 36, same as sales order) from the posting of a shipment.

    Be careful of consider the relation with the original Sales order when creating the invoice, in order to assure that this can be deleted when posting the Invoice, or using the data deletion process after all of this.

    Regards.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Auto creation of Sales invoice when we post shipment.

    Thanks..

    Actually i dont need posted sales invoice.I only need sales invoice to be created when i post shipment.

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: Auto creation of Sales invoice when we post shipment.

    Why don't you use Ship & Invoice option while posting the order which will create the shipment and Invoice.

  • Ruben.Mejia87 Profile Picture
    Ruben.Mejia87 166 on at
    RE: Auto creation of Sales invoice when we post shipment.

    Hello,

    We agree that in the shipment you have all the necessary information to call out the Codeunit 80, the one that is used to make Sales Post.

    You need to send the Rec corresonding to the Sales Header related to the Shiptment.

    I hope this level of detail will be useful for you.

    Regards.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Auto creation of Sales invoice when we post shipment.

    Thanks,

    Yes i will customize

    Would you explain in detail as how can i do this?

    In which masters or codeunit i should modify. :)

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,139 Super User 2024 Season 2 on at
    RE: Auto creation of Sales invoice when we post shipment.

    its not standard, you have to custmize it if you want.

    or you can use get shipment lines and selected posted shipments.

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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans