Field.getValue

Returns an Object representing the value of the form field. See also method getDisplayValue() which returns a String value for the form field and is the value shown to the user.

The Java object type returned depends on the form field type:

  • Boolean - returns a Boolean (Javascript boolean)
  • Character - returns a String (Javascript string)
  • Currency - returns a BigDecimal (Javascript number)
  • Date - returns a Long representing the number of milliseconds since 1st January 1970, where the time portion is initially set to 00:00 (Javascript number)
  • Datetime - returns a Long representing the number of milliseconds since 1st January 1970 (Javascript number)
  • Integer - returns a BigInteger (Javascript number)
  • Numeric - returns a BigDecimal (Javascript number)
  • Object - returns the object set using the #setValue(Object) method. Use #getDisplayValue() when there is a need to pass the object across mediums that only support character data.
  • Time - returns a Long representing the number of milliseconds since midnight (Javascript number)
Further documentation.

Javascript example:

 var d1 = new Date(fields.DATE_FIELD.value);
 d1.setDate(d1.getDate() + 7);
 

returns java.lang.Object