Skip to main content
Solved

Custom field from Inventory Item to MRP

  • July 13, 2022
  • 1 reply
  • 146 views

cmoreland
Semi-Pro III
Forum|alt.badge.img

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. 

[PXDBString]
[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

Hi @cmoreland 

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

[PXDBString]
[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

 

 

 

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

1 reply

Leonardo Justiniano
Jr Varsity II
Forum|alt.badge.img+4

Hi @cmoreland 

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

[PXDBString]
[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

 

 

 


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