Reputation: 193
Im trying to assign variables to my graph from InventoryItem and InventoryItemExt.
(First Column is a InventoryItem Selector)
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;
Upvotes: 0
Views: 631
Reputation: 6778
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>();
Upvotes: 2