Is it possible to pull this highlighted Stock item Description tab Information into a GI.

Is it possible to pull this highlighted Stock item Description tab Information into a GI.

Best answer by jinin
Try the below approach:
public class InventoryItemExt : PXCacheExtension<InventoryItem>
{
[PXString(IsUnicode = true)]
[PXUIField(DisplayName = "Description (Plain Text)")]
public virtual string UsrPlainBody { get; set; }
public abstract class usrPlainBody : PX.Data.BQL.BqlString.Field<usrPlainBody> { }
}
protected virtual void _(Events.FieldSelecting<InventoryItem, InventoryItemExt.usrPlainBody> e)
{
var row = e.Row as InventoryItem;
if (row?.Body == null) return;
string text = Regex.Replace(row.Body, "<[^>]+>", string.Empty);
e.ReturnValue = HttpUtility.HtmlDecode(text).Trim();
}
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.