Monday, June 30, 2014

Validate fields to accept Numeric values only. AX 2012 / Ax 2009 . textChange()

  Validate Field with Numeric values only.
There are often times, when we need to validate fields to accept values which are numeric only. For example telephone numbers.
The below code can help us achieve this.

public void textChange()
{
    super();
    this.text(strkeep(this.text(), "0123456789"));


Thanks, 

1 comment:

  1. I have a good one:

    if( strLen(strkeep(VALUE, ":;=?¡¿!|¬°&%/(){}[]¨+<>@")) > 0){
    error("info error");
    }

    ReplyDelete