Contents tagged with Sales Order
today I want to write a few words on my latest time spending in Acumatica. Recently I was asked to add additional validations to actions Create shipment:
and Confirm Shipment:
Idea was the following, if user clicks on Create shipment action or at Confirm Shipment action, some function should be executed which throws exception and prevents Creation/confirmation of shipment if some conditions are not meet.
At first glance task was trivial. I supposed that all that will be needed, just override method Create Shipment of SOOrderEntry and Cofirm Shipment of SOShipmentEntry. And jumped right to the code.
In order to modify behavior of those two methods, I've created … more
today I want to write a short notice on how to create new sales order in Acumatica properly.
So, first of all take not that SOOrder type has two keys. One key is or order type, and second key is for OrderNbr.
It means that you can't do code like this:
var newSOrder = sOEntry.Document.Insert();
or actually you can, but later you'll face some issues with duplicated sales orders ( as I recently faced ).
But what you should do if you wish create new Sales order is the following code snippet:
var newSOrder = new SOOrder();
newSOrder.OrderType = sorder.AcumaticaOrderType; … more