Quantcast
Channel: Acumatica Singapore
Viewing all articles
Browse latest Browse all 110

Adding Verification Logic to a Field

$
0
0
Hi Guys,

There is a common customization task to add some piece of business logic to a field.
Here is the example of adding verification to a Journal Transaction screen.

In short, for certain Accounts (Expense and Income) I will need to check that user entered Customer or Vendor into Journal Transaction screen. Balance Sheet accounts should be skipped.

Here is how it supposed to look like:


Thanks to a reworked Acumatica API documentation, it was not a Rocket Science to develop a simple piece of code below that covers this logic:


Please take note of:

sender.RaiseExceptionHandling<GLTran.referenceID>(e.Row, row.ReferenceID, new PXSetPropertyException(ErrorMessages.FieldIsEmpty , PXErrorLevel.RowError, typeof(GLTran.referenceID).Name));

That identifies where exactly to show a red cross Error.

All the Best,

Sergey.

Viewing all articles
Browse latest Browse all 110

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>