0
votes

Im trying to assign variables to my graph from InventoryItem and InventoryItemExt.

Code enter image description here (First Column is a InventoryItem Selector) enter image description here

I've also tried using another PXSelectorAttribute, doing so I received an attribute error on runtime

InventoryItemExt item2 = PXSelectorAttribute.Select<atcProjectLinesTable.itemNumber>(cache,line) as InventoryItemExt;

1

1 Answers

2
votes

Your FieldUpdated handler was declared for the atcProjectLinesTable DAC - cache parameter represents PXCache instance created for the atcProjectLinesTable DAC, not InventoryItem. I would assume the issue to happen when the system invokes cache.GetExtension<InventoryItemExt>(item).

Try replacing the following line

InventoryItemExt item2 = cache.GetExtension<InventoryItemExt>(item);

with

InventoryItemExt item2 = item.GetExtension<InventoryItemExt>();