Solved

Sales order references not being set by Production order service

  • 25 April 2022
  • 3 replies
  • 147 views

We are importing purchase orders from customers into Acumatica using the SalesOrder endpoint of the REST API.  Once we have that completed, we are trying to create a production order using the ProductionOrder endpoint of the REST API.  The production order is created just fine but we’re passing along the sale order reference information which is not being set for some reason.  Any idea as to why that would be happening?  Here are the details of what we’re doing.

PUT → https://Our-Domain/entity/Manufacturing/20.200.001/ProductionOrder

JSON → 

{
"Customer": {
"value": "000000001433"
},
"InventoryID": {
"value": "107753"
},
"OrderType": {
"value": "RO"
},
"SOLineNbr": {
"value": 1
},
"SOOrderNbr": {
"value": "007744"
},
"SOOrderType": {
"value": "SO"
}
}

We are on 2020 R2 Manufacturing version.  Thank you in advance for your help.

 

icon

Best answer by Nayan Mansinha 28 April 2022, 00:54

View original

3 replies

Userlevel 4
Badge +2

Production Order screen has sales order reference fields disabled.  So these fields are read-only.  In order to tie sales order to production order, one must create sales order and mark order lines for production order and then use Create Production Orders (CreateProductionOrder entity from manufacturing endpoint) to create require production order.  See example API calls - 

1) Create Sales order with item marked for production

PUT ~/entity/Default/20.200.001/SalesOrder
{
    "OrderType": {
        "value": "SO"
    },
    "CustomerID": {
        "value": "AACUSTOMER"
    },
    "Details": [
        {
            "InventoryID": {
                "value": "AACOMPUT01"
            },
            "OrderQty": {
                "value": 1.000000
            },
            "custom": {
                "Transactions": {
                    "AMProdCreate": {
                        "type": "CustomBooleanField",
                        "value": true
                    }
                }
            }
        }
    ]
}

Note the use of “custom” section to flag line for production order, more information is found here - Acumatica

2) Now create production order for this sales order using CreateProductionOrder entity

POST ~/entity/MANUFACTURING/21.200.001/CreateProductionOrder/CreateProductionOrderProcessAll
{
"entity" : { "CreationOrderType" : { "value" : "RO"}, "SOOrderType" : { "value" : "SO" }, "SOOrderNbr" : { "value" : "SO006773" }},
"parameters" : {}
}

Assuming SO006773 was created in step 1.

3) Above call returns 202 when successful and will contain Location header using which one can check the out come of the call.  More information is found here - Acumatica

GET ~/entity/MANUFACTURING/21.200.001/CreateProductionOrder/CreateProductionOrderProcessAll/status/cbcc2d26-bd66-4eef-9e1f-b5b9c0eac1a3

 

Thank you very.  Will give it a shot and report back.  Really appreciate your help.

This worked perfectly!  The links provided were very helpful as well.  Thank you again for all of your help.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved