Search code examples
c#asp.netacumatica

How to Get Custom Field value acumatica


I'm new in developing acumatica I am stuck at getting the value of a custom TextEdit field that I created. I can get all of the built-in field value through this code

InventoryItem items = (InventoryItem)Base.Item.Cache.Current;

but I cannot get the one that I have created at acumatica customization here is the field I want to get

https://i.sstatic.net/gPln4.png

I already tried

InventoryItem items = (InventoryItem)Base.ItemSettings.Cache.Current;

var shortdesc = items.UsrShortDescription;

But it's not working and does not show the value inside the textbox thank you in advance for helping


Solution

  • InventoryItem items = (InventoryItem)Base.ItemSettings.Current;
    var itemExt = PXCache<InventoryItem>.GetExtension<InventoryItemExt>(items);
    var shortdesc = itemExt.UsrShortDescription;