# JSRecordMarker

## Overview

The `JSRecordMarker` scripting wrapper represents a specific validation failure report for a record during a save operation. It allows detailed reporting of issues tied to particular columns or data in a single record. ## Functionality

The `customObject` property stores a user-defined object associated with the record marker, enabling the inclusion of custom metadata. The `dataprovider` specifies the column where the issue occurred, providing precise error localization. Message handling includes the `message` property, which holds the problem description and can be an internationalization (i18n) key, while the `i18NMessage` property resolves the i18n key when applicable.

The `level` property indicates the logging level assigned to the record marker, classifying the severity of the issue. The `record` property links the marker to the specific record it references, facilitating direct association with the affected data.

This wrapper is closely related to [JSRecordMarkers](https://docs.servoy.com/reference/servoycore/dev-api/database-manager/jsrecordmarkers), which manages validation states and aggregates multiple `JSRecordMarker` instances for broader reporting and validation workflows.

## Reference

## Properties Summarized

| Type                                                                                       | Name                          | Summary                                                                                  |
| ------------------------------------------------------------------------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------- |
| [Object](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/object)               | [customObject](#customobject) | The custom object the users did give the the JSRecordMarkers.                            |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)               | [dataprovider](#dataprovider) | The column of this record where this problem is reported for.                            |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)               | [i18NMessage](#i18nmessage)   | The the resolved i19n message if the message was an i18n key.                            |
| [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)               | [level](#level)               | The LOGGINGLEVEL the users did give the the JSRecordMarkers.                             |
| [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)               | [message](#message)           | The message of this problem, can be a i18n key, see getI18NMessage() for a resolved one. |
| [JSRecord](https://docs.servoy.com/reference/servoycore/dev-api/database-manager/jsrecord) | [record](#record)             | The record for which this problem is generated.                                          |

## Properties Detailed

### customObject

The custom object the users did give the the JSRecordMarkers.report() method.

**Type**\
[Object](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/object) the customObject

### dataprovider

The column of this record where this problem is reported for.

**Type**\
[String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) the column

### i18NMessage

The the resolved i19n message if the message was an i18n key.

**Type**\
[String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) the resolved message

### level

The LOGGINGLEVEL the users did give the the JSRecordMarkers.report() method.

**Type**\
[Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) the level

### message

The message of this problem, can be a i18n key, see getI18NMessage() for a resolved one.

**Type**\
[String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string) the message

### record

The record for which this problem is generated.

**Type**\
[JSRecord](https://docs.servoy.com/reference/servoycore/dev-api/database-manager/jsrecord) the record

***
