Skip to main content
Solved

I am trying to make the qty field in labor for production orders a required field with a value greater than 0.00 in acumatica what are the steps?

  • August 21, 2024
  • 1 reply
  • 29 views

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?

Best answer by Naveen Boga

@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)
       {
       }

   }

 

View original
Did this topic help you find an answer to your question?

1 reply

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3407 replies
  • Answer
  • August 25, 2024

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings