Hi,
We are attempting to start having our sales order posted and invoiced when the order leaves the building instead of having customer service go in every day and Ship and Invoice every order.
We have created an external database that will read the sales order number and then with a handheld devise we are able to read the barcode of each item on the order and then we will print off what actually shipped.
So I would like to build a dataport that will update the the quantity shipped and qty. to ship and then run the codeunit 83 (I think that is the one that will ship and invoice an order) and have it print off the invoice and do all of the accounting entries and update everything. I feel confident that I can builde a dataport to overwrite the Outstanding Quantity and Qty to Ship fields but how can I get it to actually ship and invoice the order automatically and also print the invoice?
Thanks in advance
Comments
Next you have to make a copy of codeunit 5765 - Whse.-Post Shipment + Print. To post shipment without confirm to user and invoice.
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
You need only to overwrite "Qty. To Ship". But remember to use a VALIDATE on the field, because this validate has to do other things too.
The data you import from a textfile is best limited to 1 sales order per file.
This because when you post a sales order, at the end there is a COMMIT.
So if you post multiple sales orders and in one of them, you have an error, the others will have been posted and COMMITED, but not all. And in this case you will need to track what has been posted and what not.
So:best 1 sales order per textfile!
In the OnPostDataport-trigger, you can post (=ship+invoice) your sales order.
Of course, you need to have saved the number of the sales order in some variable.
This is the code for posting (=ship+invoice) a sales order in the OnPostDataport-trigger:
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thanks again