Skip to main content

I'm working on making the Qty field in labor for production orders a required field with a value greater than 0.00 in Acumatica. I set the correct field as 'true' and published the project, but it doesn't seem to be working. Should I add a condition or incorporate this requirement into the workflow to enforce it?

@michaelharmon5268571  This won’t work because, by default value is saving as 0.00 and you can’t add the conditions for the Line level fields (This is Acumatica limitation).

You can create new workflow for the Labor and make this field as mandatory OR simply you can achieve this by CacheAttached event below.

Example:

 

   public class LaborEntryExt : PXGraphExtension<LaborEntry>
{
PXMergeAttributes(Method = MergeMethod.Merge)]
PXUIVerify(typeof(Where<AMMTran.qty, Greater<decimal0>>),
PXErrorLevel.Error, "Qty should be greater than Zero.",
CheckOnInserted = false, CheckOnRowSelected = false, CheckOnVerify = true, CheckOnRowPersisting = true)]
protected virtual void AMMTran_Qty_CacheAttached(PXCache cache)
{
}

}

 


Reply