Custom field from Inventory Item to MRP

  • 13 July 2022
  • 1 reply

Userlevel 4

I have a custom field on the inventory item called usrBuyerPlanner. I want to show that data in my MRP Display (AM400000) I have created a custom filed here Called usrBPCode and modified the attributes like so. 

[PXUIField(DisplayName="Buyer Planner")]
[PXFormula(typeof(Selector<AMRPDetailExt.usrBPCode, InventoryItemExt.usrBuyerPlanner>))]

However it does not appear to be pulling in the BPcode from the item. Any thoughts? 



Best answer by Leonardo Justiniano 13 July 2022, 17:07

View original

1 reply

Userlevel 6
Badge +4

Hi @cmoreland 

I would try adding a Selector to pull the value. Something like:

[PXUIField(DisplayName="Buyer Planner")]
[PXDBScalar(typeof(Search<InventoryItemExt.usrBuyerPlanner, Where<InventoryItem.InventoryID, Equal<AMRPDetail.InventoryID>>>))]
[PXSelector(typeof(Search<InventoryItemExt.usrBuyerPlanner, Where<InventoryItem.InventoryID, Equal<AMRPDetail.InventoryID>>>),
SubstituteKey = typeof(InventoryItem.inventoryCD),
DescriptionField = typeof(InventoryItem.descr))]

Edit: Please also add a selector to the field so it will format the field with the natural CD key and description if you wish





About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved