Child pages
  • Data/Record/Column validation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
var recordMarkers = databaseManager.validate(record, {originationCall: "customerForm"});
if (recordMarkers)
{
   var problemsmarkers = recordMarkers.getProblemsgetMarkers();
   problemsmarkers.forEach(/** @param {JSRecordMarker} problemmarker*/ function(problemmarker) {
			application.output(problemmarker.message)
			application.output(problemmarker.i18NMessage);
			application.output(problemmarker.column);
			application.output(problemmarker.customObject);
		});
}


Besides the getMarkers() the JSRecordMarkers has also some extra state, 2 boolean properties: onBeforeInsertFailed and onBeforeUpdateFailed those are filled in if the onRecordUpdate or Insert failed in a legacy way (returning false), here is also a getGenericExceptions() method that will return exception that could be happen in the validation code that are not directly record or column validation problems but more generic once like exceptions that are triggered when the onRecordUpdate or Insert did fail.

...