I have a question I hope you can answer, if so you will save my day and weekend.
The problem is I have is that a function in the Item table calculates the Inventory and if I do the same thing with a codeunit, gives a different result(only with some Item posts, not all).
The code in the Item table:
CALCFIELDS(Inventory);
testdump := Inventory;
MESSAGE(FORMAT(testdump));
The code in the Codeunit:
item.CALCFIELDS(item.Inventory);
return := item.Inventory;
IF(ItemCode='GTX280') THEN
MESSAGE(FORMAT(return));
I appreciate any help
0
Comments
Mean how looks the filter on Item (maybe a filter is set)?
REgards
IF(item.GET(ItemCode)) THEN
BEGIN
item.CALCFIELDS(item.Inventory);
return := item.Inventory;
IF(ItemCode='GTX280') THEN
MESSAGE(FORMAT(return));
If you look at the properties of the inventory field on the item table, you will see that there are filter affecting the calculating the value on the inventory flowfield. Can you check is any of these filters are set before the code you have shown e.g. Global Dimension 1 Filter, Location Filter, etc
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html