Hello,
I have a user defined field Workorder, that I need to access from some business logic. How do I do this?
Thanks

Hello,
I have a user defined field Workorder, that I need to access from some business logic. How do I do this?
Thanks
Best answer by Vignesh Ponnusamy
Hello
protected void SOOrder_RowPersisting(PXCache cache, PXRowPersistingEventArgs e, PXRowPersisting baseevent)
{
if (baseevent != null)
baseevent(cache, e);
SOOrder row = (SOOrder)Base.Document.Current;
//var Itemcache = Base.Document.Cache;
var udfAMBATLEN = (PXStringState)cache.GetValueExt(row, "AttributeAMBATLEN");
if (Base.Document.Current.OrderQty > 5)
{
cache.SetValueExt(row, "AttributeAMBATLEN", "Greater than 5"); //To set the value of attri
}
else
{
cache.SetValueExt(row, "AttributeAMBATLEN", "Less than 5");
}
}
Note: If you have the AttributeID ProjectCategories, you should prefix it with the Attribute(like AttributeProjectCategories) in the GetValueExt.
Thanks, Vignesh
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.