Skip to main content
Solved

Extending a Data View to Include another Related DAC

  • 24 July 2024
  • 2 replies
  • 52 views

On the Purchase Orders Screen (PO301000), I’m trying to extend the View responsible for populating the Details Tab. Specifically, these details are made up of Purchase Order Lines (POLine) which each have an InventoryID, which is the identifier for an InventoryItem. I want to be able to add data fields from the Inventory Item to this View in order to be able to add them to the Details Tab Grid. Does anyone know how to do this? Below is my attempt to override the original PXOrederedSelect responsible for creating the Data View that populates the Details Grid. 

I add the PXOverride and the LeftJoin logic, but everything else is the original code.

pPXOverride]
PXViewName(Messages.POLine)]
PXImport(typeof(POOrder))]
PXCopyPasteHiddenFields(typeof(POLine.closed), typeof(POLine.cancelled), typeof(POLine.completed))]
public PXOrderedSelect<POOrder, POLine,
LeftJoin<InventoryItem, On<POLine.inventoryID, Equal<InventoryItem.inventoryID>>>,
Where<POLine.orderType, Equal<Current<POOrder.orderType>>,
And<POLine.orderNbr, Equal<Optional<POOrder.orderNbr>>>>,
OrderBy<Asc<POLine.orderType, Asc<POLine.orderNbr, Asc<POLine.sortOrder, Asc<POLine.lineNbr>>>>>> Transactions;


Any help on getting this to work or any other ideas would be greatly appreciated!

2 replies

Userlevel 4
Badge +1

Hello @mattsc 

 

This PXOverride of the Transactions data view is valid for what you’re trying to accomplish. If you want to know how to actually add the columns from the Inventory Item fields onto the grid on the Purchase Orders screen, you’ll have to do so through the Customization Project Editor. You can create a project modifying the existing screen (PO301000), then on the Transactions grid, add the controls for the fields from the Inventory Item you want to add. The fields that are from the InventoryItem DAC will have the “InventoryItem__” prefix on the field name. Here’s an example of that adding a control for ItemClassID from the item.
 

 


And here’s an article on our help site that describes the process in greater detail: To Add a Column for a Data View

@NicholasBova52 Thank you so much! This works great!

Reply