How check quantitiy items in warehouse and in sales order?

Hey, guys.

I need check quantity in every line items sales order with quantity in warehouse. Сan anyone have an example of how this can be done. I can not understand what the table is stored items in warehouse?

Thanks for advance

Hi Dmitriji,

Basically inventsum table holds all the inventory(item) quantities based on different inventdimid(inventory dimensions).

You can try this code:

InventDimParm invDimParm;

InventDim invDim;

Qty availPhys;

;

invDim.InventLocationId = ‘INVENTLOCATIONID’;

invDim = InventDim::findOrCreate(invDim);

invDimParm.initFromInventDim(InventDim::find(invDim.inventDimId));

availPhys = InventSum::findSum(“ITEMID”,invDim,invDimParm).availPhysical();

info(strfmt("availPhys:%1 ",availPhys));

It would help you … :slight_smile:

Hi,

Inventsum::(salesline.itemid, salesline.inventdimid).availPhysicalCalculated();

what is this salesline.inventdimid?

Check SalesTable form> Salesline is having line items of sales order.

Main relation between sales Table and sales line is salesId.

thanks for unswer)

On form SalesTable i have checkbox(for example with name shipComplete). If this checkbox selected, when click purchase order i need check quantity in order and in warehouse. How i know, i need write code in method main class PurchCreateFromSalesOrder. How me check in code my chexbox on form SalesTable?

P.S. Maybe its simple quation, sorry, but i am beginner in ax

what is this - Inventsum ::(salesline.itemid, salesline.inventdimid)? Its correct syntaxis?