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
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
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.
Thanks..
Actually i dont need posted sales invoice.I only need sales invoice to be created when i post shipment.
Why don't you use Ship & Invoice option while posting the order which will create the shipment and Invoice.
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.
Thanks,
Yes i will customize
Would you explain in detail as how can i do this?
In which masters or codeunit i should modify. :)
its not standard, you have to custmize it if you want.
or you can use get shipment lines and selected posted shipments.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156