Question

Need to create UOM Conversions on Non-Stock Items via API / can't find object.


Userlevel 1

Hello again!

 

I have a question relating to the automatic creation of item codes through the API.

 

Along with the item codes themselves, I have a need to populate the unit of measure conversions (for example Cartons to LBS or Pallets with the conversion factors.

 

The problem I am facing is, the UOMConversions class is not available in the Non-Stock Items object.  It IS available on Stock Items, but we are not using those.

 

We had a consulting group build out the initial system and they created a customization project to get us to where we can apparently have the UOM conversions on Non-Stock Items (as shown in this screenshot), however I am unable to contact them and need to figure out how to create those entries on the non-stock items via the API myself (along with help from here if possible).


Here’s a shot of the Non-Stock Items in the customization project showing the fields I need access to:

 

I just don’t know how to gain access to those fields via the class objects. 

I found a class object called InventoryItemUOMConversion, but don’t know how to tie that to the item code I am creating in the same API call to create the item.  

Can anyone help?


3 replies

Userlevel 1

I think I may have figured it out.  Still learning my way around the API and the classes and all the requirements that go along with accessing things.

 

Seems as if I had to add the following fields to my extended endpoint for Non-Stock Items to make them available.

 


Now that they are there I can pull the content from PostMan and I see it returned both conversion entries I had set up for LBS and PALLETS along with the other fields that go along with them.

So my next question is:

When pushing a new non-stock item into Acumatica, will it support me sending both needed UOM conversions along with the item itself, or should I create the item first, then push the individual conversion entries up afterwards using the ID of the newly created item? 

 

Userlevel 1

Well, I tried pushing both conversions at once.  It only took the first one, then complained that more than one entity satisfied the condition...so I still can’t get the second entry to save. 

I feel like instead of just accessing the fields like I did through the endpoint, it should be a sub-class within the Non-Stock Items (like Stock-Items has) but don’t know how to extend it that way.

This is what the result looks like when I query for a specific itemcode.  It returns twice, once for each diferent conversion value:

[

    {

        "id": "b13c3f2f-13a5-ee11-8e96-000d3af50588",

        "rowNumber": 1,

        "note": {

            "value": ""

        },

        "ConversionFactor": {

            "value": 25.000000

        },

        "Description": {

            "value": "Lettuce, Naked, 24"

        },

        "FromUnit": {

            "value": "LBS"

        },

        "InventoryID": {

            "value": "21001"

        },

        "MultiplyDivide": {

            "value": "Multiply"

        },

        "ToUnit": {

            "value": "CTN"

        },

        "custom": {},

        "_links": {

            "self": "/ourinstrance/entity/DefaultDev/22.200.001/NonStockItem/b13c3f2f-13a5-ee11-8e96-000d3af50588",

            "files:put": "/ourinstance/entity/DefaultDev/22.200.001/files/PX.Objects.IN.NonStockItemMaint/Item/b13c3f2f-13a5-ee11-8e96-000d3af50588/{filename}"

        }

    },

    {

        "id": "b13c3f2f-13a5-ee11-8e96-000d3af50588",

        "rowNumber": 2,

        "note": {

            "value": ""

        },

        "ConversionFactor": {

            "value": 40.000000

        },

        "Description": {

            "value": "Lettuce, Naked, 24"

        },

        "FromUnit": {

            "value": "PALLET"

        },

        "InventoryID": {

            "value": "21001"

        },

        "MultiplyDivide": {

            "value": "Multiply"

        },

        "ToUnit": {

            "value": "CTN"

        },

        "custom": {},

        "_links": {

            "self": "/ourinstance/entity/DefaultDev/22.200.001/NonStockItem/b13c3f2f-13a5-ee11-8e96-000d3af50588",

            "files:put": "/ourinstance/entity/DefaultDev/22.200.001/files/PX.Objects.IN.NonStockItemMaint/Item/b13c3f2f-13a5-ee11-8e96-000d3af50588/{filename}"

        }

    }

]

Userlevel 1

Let me rephrase what I am trying to get to:

I need to be able to send UOM Conversions up and into a Non-Stock item like this:
 


The screenshot is from a Stock-Item pull in PostMan after I created the UOM conversions against the stock item. 

The problem is, all our items are Non-Stock items and we need both LBS to CTN and PALLET to CTN conversion factors to get created through the API along with the new item being created.

Is there any way to extend the objects so that I can access the UOMConversions on a non-stock item?

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