Question

Multi-Field Multi-Row Validation

  • 29 November 2023
  • 1 reply
  • 32 views

I have a object that needs to be unique using a three-part key of ColumnA (int), ColumnB (DateTime), ColumnC (DateTime).  I understand that the row passed to FieldValidating and FieldUpdating do not contain actual row values, just the .NewValue for the field. 

I’d *like* to make the error occur on the last change to the row which causes the duplicate, but I’m not seeing a way to do this. 

What is the preferred way to do Multi-Field Cross-Row Validation?


1 reply

I know about  [PXCheckUnique(Where = typeof(Where<EMPTimeSwipe.bAccountID, Equal<Current<EMPTimeSwipe.bAccountID>>, And<EMPTimeSwipe.swipeTime, Equal<Current<EMPTimeSwipe.swipeTime>>>>))]
 

The problem is a little more complex if the rule is that the swipeTime can’t be within 6 minutes of another swipe time for the same person on the same day.

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved