1
votes

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.stack.imgur.com/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

2

2 Answers

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

Vardan showed one way, for completeness of picture want to show another as well:

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