I would like to customize the SOLine InventoryID
selector to filter out certain inventory items based on the value of the class they are part of. I've read about the [PXRestrictor]
attribute and how it can be used to filter selectors. This seems like it would work, except that the Item Class name is not available in that DAC, so I tried this:
[PXRestrictor(typeof(SelectFrom<InventoryItem>.
InnerJoin<INItemClass>.On<INItemClass.itemClassID.IsEqual<InventoryItem.itemClassID>>.
Where<INItemClass.itemClassCD.IsEqual<itemClassValue>>), "Custom items")]
but this is apparently not allowed.
It seems like I would need to override the selector itself, but the existing selector is rather convoluted and hidden beneath layers of attributes and I am not sure how to replicate even that, not to mention that option seeming rather near-sighted.
How could I go about this, or is this simply not a good option?