Skip to main content
Solved

Extending a Data View to Include another Related DAC


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.

[PXOverride]
      [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!

Best answer by NicholasBova52

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

View original
Did this topic help you find an answer to your question?

2 replies

NicholasBova52
Acumatica Employee
Forum|alt.badge.img+1
  • Acumatica Employee
  • 27 replies
  • Answer
  • July 24, 2024

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


  • Author
  • Freshman I
  • 1 reply
  • July 24, 2024

@NicholasBova52 Thank you so much! This works great!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings