Codeunit 5505374 M365 Json Helper

Codeunit 5505374 M365 Json Helper

Codeunit M365 Json Helper (ID 5505374). Helper functions to handle Json types.

Methods

GetJsonToken

procedure GetJsonToken(jObject: JsonObject; keyName: Text; raiseError: Boolean): JsonToken

Returns the JsonToken from a JsonObject key field for easier value handling.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to retrieve the field from

  • keyName Text

    Text: The name of the key

  • raiseError Boolean

    Boolean: If the key is not found, raise an error

  • Returns JsonToken

    JsonToken


GetJsonToken

procedure GetJsonToken(jObject: JsonObject; keyName: Text): JsonToken

Returns the JsonToken from a JsonObject key field for easier value handling. This function raises an error if the key is not found.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to retrieve the field from

  • keyName Text

    Text: The name of the key

  • Returns JsonToken

    JsonToken


SelectJsonToken

procedure SelectJsonToken(jObject: JsonObject; path: Text; var returnJToken: JsonToken): Boolean

Returns the JsonToken from a JsonObject path for easier value handling.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to select the path from

  • path Text

    Text: The path to find/return

  • returnJToken JsonToken

    JsonToken: The selected return JsonToken

  • Returns Boolean

    Boolean


SelectJsonToken

procedure SelectJsonToken(jObject: JsonObject; path: Text): JsonToken

Returns the JsonValue from a JsonObject path for easier value handling.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to select the path from

  • path Text

    Text: The path to find/return

  • Returns JsonToken

    JsonToken


GetJsonValue

procedure GetJsonValue(jObject: JsonObject; keyName: Text; raiseError: Boolean): JsonValue

Returns the JsonValue from a JsonObject key field for easier value handling.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to retrieve the field from

  • keyName Text

    Text: The name of the key

  • raiseError Boolean

    Boolean: If the key is not found, raise an error

  • Returns JsonValue

    JsonValue


GetJsonValue

procedure GetJsonValue(jObject: JsonObject; keyName: Text): JsonValue

Returns the JsonValue from a JsonObject key field for easier value handling. This function raises an error if the key is not found.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to retrieve the field from

  • keyName Text

    Text: The name of the key

  • Returns JsonValue

    JsonValue


SelectJsonValue

procedure SelectJsonValue(jObject: JsonObject; path: Text; var returnJValue: JsonValue): Boolean

Returns the JsonValue from a JsonObject path for easier value handling.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to select the path from

  • path Text

    Text: The path to find/return

  • returnJValue JsonValue

    JsonObject: The selected return object

  • Returns Boolean

    Boolean


SelectJsonValue

procedure SelectJsonValue(jObject: JsonObject; path: Text): JsonValue

Returns the JsonValue from a JsonObject path for easier value handling.

Parameters / Return Value

  • jObject JsonObject

    JsonObject: The object to select the path from

  • path Text

    Text: The path to find/return

  • Returns JsonValue

    JsonValue


Variant2Type

procedure Variant2Type(value: Variant; var typeJToken: JsonToken): Boolean

Convert a variant to the corresponding type JsonToken.

Parameters / Return Value

  • value Variant

    Variant

  • typeJToken JsonToken

    JsonToken

  • Returns Boolean

    Boolean


Variant2JsonToken

procedure Variant2JsonToken(value: Variant; var jToken: JsonToken): Boolean

Convert a variant to the corresponding JsonToken.

Parameters / Return Value

  • value Variant

    Variant

  • jToken JsonToken

    JsonToken

  • Returns Boolean

    Boolean


Variant2JsonValue

procedure Variant2JsonValue(value: Variant; var jValue: JsonValue): Boolean

Convert a variant to the corresponding JsonValue.

Parameters / Return Value

  • value Variant

    Variant

  • jValue JsonValue

    JsonValue

  • Returns Boolean

    Boolean


JTokenAsVariant

procedure JTokenAsVariant(jToken: JsonToken; dataType: Variant; var value: Variant): Boolean

Convert a JsonToken to a Variant.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • dataType Variant

    Variant

  • value Variant

    Variant

  • Returns Boolean

    Boolean


JTokenAsBoolean

procedure JTokenAsBoolean(jToken: JsonToken): Boolean

Return a JsonToken as Boolean.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Boolean

    Boolean


JTokenAsInteger

procedure JTokenAsInteger(jToken: JsonToken): Integer

Return a JsonToken as Integer.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Integer

    Integer


JTokenAsBigInteger

procedure JTokenAsBigInteger(jToken: JsonToken): BigInteger

Return a JsonToken as BigInteger.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns BigInteger

    BigInteger


JTokenAsDecimal

procedure JTokenAsDecimal(jToken: JsonToken): Decimal

Return a JsonToken as Decimal.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Decimal

    Decimal


JTokenAsTime

procedure JTokenAsTime(jToken: JsonToken): Time

Return a JsonToken as Time.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Time

    Time


JTokenAsDate

procedure JTokenAsDate(jToken: JsonToken): Date

Return a JsonToken as Date.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Date

    Date


JTokenAsDateTime

procedure JTokenAsDateTime(jToken: JsonToken): DateTime

Return a JsonToken as DateTime.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns DateTime

    DateTime


JTokenAsDuration

procedure JTokenAsDuration(jToken: JsonToken): Duration

Return a JsonToken as Duration.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Duration

    Duration


JTokenAsGuid

procedure JTokenAsGuid(jToken: JsonToken): Guid

Return a JsonToken as Guid.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Guid

    Guid


JTokenAsByte

procedure JTokenAsByte(jToken: JsonToken): Byte

Return a JsonToken as Byte.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Byte

    Byte


JTokenAsChar

procedure JTokenAsChar(jToken: JsonToken): Char

Return a JsonToken as Char.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Char

    Char


JTokenAsText

procedure JTokenAsText(jToken: JsonToken): Text

Return a JsonToken as Text.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Text

    Text


JTokenAsCode

procedure JTokenAsCode(jToken: JsonToken): Code[2048]

Return a JsonToken as Code.

Parameters / Return Value

  • jToken JsonToken

    JsonToken

  • Returns Code[2048]

    Code[2048]


ParentKey

procedure ParentKey(): Text

Returns an identifier for the parent object path.

Parameters / Return Value

  • Returns Text

    Return value of type Text.


BuildMappingDictionary

procedure BuildMappingDictionary(fromJObject: JsonObject; toRecRef: RecordRef; var returnMapDict: Dictionary of [Text, Integer]): Boolean

Build a mapping dictionary for the MapObjectToRecord() or MapArrayToRecord() mapping functions. The mapping dictionary can be passed to these functions.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • toRecRef RecordRef

    RecordRef

  • returnMapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • Returns Boolean

    Return value of type Boolean.


BuildMappingDictionary

procedure BuildMappingDictionary(var fromRecRef: RecordRef; excludeFlowFields: Boolean; excludeSystemFields: Boolean; var returnMapDict: Dictionary of [Text, Integer]): Boolean

Build a mapping dictionary for the MapRecordToObject() or MapRecordToArray() mapping functions. The mapping dictionary can be passed to these functions.

Parameters / Return Value

  • fromRecRef RecordRef

    RecordRef

  • excludeFlowFields Boolean

    Boolean

  • excludeSystemFields Boolean

    Boolean

  • returnMapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • Returns Boolean

    Return value of type Boolean.


SetMappingLanguage

procedure SetMappingLanguage(newMappingLanguageId: Integer)

Sets a new language id used to format and evaluate specific values like options or enums.

Parameters / Return Value

  • newMappingLanguageId Integer

    Integer.


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; skipValidate: Boolean; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]; forceFieldMatch: Boolean; clearRecord: Boolean): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by using the mapDict dictionary of [Text, Integer] containing the json names and field numbers. If forceFieldMatch is specified, and there is anything unmatched, an error is raised.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • skipValidate Boolean

    Boolean

  • toRecRef RecordRef

    RecordRef

  • mapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • forceFieldMatch Boolean

    Boolean

  • clearRecord Boolean

    Boolean

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]; forceFieldMatch: Boolean; clearRecord: Boolean): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by using the mapDict dictionary of [Text, Integer] containing the json names and field numbers. If forceFieldMatch is specified, and there is anything unmatched, an error is raised.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • toRecRef RecordRef

    RecordRef

  • mapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • forceFieldMatch Boolean

    Boolean

  • clearRecord Boolean

    Boolean

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; skipValidate: Boolean; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]; forceFieldMatch: Boolean): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by using the mapDict dictionary of [Text, Integer] containing the json names and field numbers. If forceFieldMatch is specified, and there is anything unmatched, an error is raised.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • skipValidate Boolean

    Boolean

  • toRecRef RecordRef

    RecordRef

  • mapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • forceFieldMatch Boolean

    Boolean

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]; forceFieldMatch: Boolean): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by using the mapDict dictionary of [Text, Integer] containing the json names and field numbers. If forceFieldMatch is specified, and there is anything unmatched, an error is raised.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • toRecRef RecordRef

    RecordRef

  • mapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • forceFieldMatch Boolean

    Boolean

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; skipValidate: Boolean; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by using the mapDict dictionary of [Text, Integer] containing the json names and field numbers.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • skipValidate Boolean

    Boolean

  • toRecRef RecordRef

    RecordRef

  • mapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by using the mapDict dictionary of [Text, Integer] containing the json names and field numbers.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • toRecRef RecordRef

    RecordRef

  • mapDict Dictionary[Text,Integer]

    Dictionary of [Text, Integer]

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; skipValidate: Boolean; var toRecRef: RecordRef; forceFieldMatch: Boolean): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by matching the Json key names to the field names of the record reference. If forceFieldMatch is specified, and there is anything unmatched, an error is raised.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • skipValidate Boolean

    Boolean

  • toRecRef RecordRef

    RecordRef

  • forceFieldMatch Boolean

    Boolean

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; var toRecRef: RecordRef; forceFieldMatch: Boolean): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by matching the Json key names to the field names of the record reference. If forceFieldMatch is specified, and there is anything unmatched, an error is raised.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • toRecRef RecordRef

    RecordRef

  • forceFieldMatch Boolean

    Boolean

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; skipValidate: Boolean; var toRecRef: RecordRef): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by matching the Json key names to the field names of the record reference.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • skipValidate Boolean

    Boolean

  • toRecRef RecordRef

    RecordRef

  • Returns Boolean

    Boolean


MapObjectToRecord

procedure MapObjectToRecord(fromJObject: JsonObject; var toRecRef: RecordRef): Boolean

Maps the values of a dictionary like Json Object to their respective record reference fields. This is done by matching the Json key names to the field names of the record reference.

Parameters / Return Value

  • fromJObject JsonObject

    JsonObject

  • toRecRef RecordRef

    RecordRef

  • Returns Boolean

    Boolean


MapArrayToRecord

procedure MapArrayToRecord(fromJArray: JsonArray; skipValidate: Boolean; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]; forceFieldMatch: Boolean): Boolean

Maps the field values from a JsonArray to Records of the Record Reference. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromJArray JsonArray

    The source Json array to get the values from.

  • skipValidate Boolean

    Boolean

  • toRecRef RecordRef

    The Record Reference to which the values should be applied and saved.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • forceFieldMatch Boolean

    If true, and there is anything unmatched, an error is raised.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapArrayToRecord

procedure MapArrayToRecord(fromJArray: JsonArray; var toRecRef: RecordRef; mapDict: Dictionary of [Text, Integer]; forceFieldMatch: Boolean): Boolean

Maps the field values from a JsonArray to Records of the Record Reference. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromJArray JsonArray

    The source Json array to get the values from.

  • toRecRef RecordRef

    The Record Reference to which the values should be applied and saved.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • forceFieldMatch Boolean

    If true, and there is anything unmatched, an error is raised.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapArrayToRecord

procedure MapArrayToRecord(fromJArray: JsonArray; skipValidate: Boolean; var toRecRef: RecordRef; forceFieldMatch: Boolean): Boolean

Maps the field values from a JsonArray to Records of the Record Reference.

Parameters / Return Value

  • fromJArray JsonArray

    The source Json array to get the values from.

  • skipValidate Boolean

    Boolean

  • toRecRef RecordRef

    The Record Reference to which the values should be applied and saved.

  • forceFieldMatch Boolean

    If true, and there is anything unmatched, an error is raised.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapArrayToRecord

procedure MapArrayToRecord(fromJArray: JsonArray; var toRecRef: RecordRef; forceFieldMatch: Boolean): Boolean

Maps the field values from a JsonArray to Records of the Record Reference.

Parameters / Return Value

  • fromJArray JsonArray

    The source Json array to get the values from.

  • toRecRef RecordRef

    The Record Reference to which the values should be applied and saved.

  • forceFieldMatch Boolean

    If true, and there is anything unmatched, an error is raised.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJObject: JsonObject; mapDict: Dictionary of [Text, Integer];clearObject: Boolean; excludeEmptyFields: Boolean; parent: JsonToken): Boolean

Maps the field values of a Record Reference to a JsonObject. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJObject JsonObject

    The target Json object to map to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • clearObject Boolean

    Specify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.

  • excludeEmptyFields Boolean

    Specify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.

  • parent JsonToken

    The Json token of the parent object.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJsonDict: Codeunit "M365 Json Dictionary"; mapDict: Dictionary of [Text, Integer];clearObject: Boolean; excludeEmptyFields: Boolean; parent: JsonToken): Boolean

Maps the field values of a Record Reference to a JsonObject. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJsonDict Codeunit "M365 Json Dictionary"

    The target Json Dictionary to map to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • clearObject Boolean

    Specify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.

  • excludeEmptyFields Boolean

    Specify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.

  • parent JsonToken

    The Json token of the parent object.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJObject: JsonObject; mapDict: Dictionary of [Text, Integer];clearObject: Boolean; excludeEmptyFields: Boolean): Boolean

Maps the field values of a Record Reference to a JsonObject. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJObject JsonObject

    The target Json object to map to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • clearObject Boolean

    Specify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.

  • excludeEmptyFields Boolean

    Specify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJObject: JsonObject;clearObject: Boolean; excludeEmptyFields: Boolean; excludeFlowFields: Boolean; excludeSystemFields: Boolean): Boolean

Maps the field values of a Record Reference to a JsonObject.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJObject JsonObject

    The target Json object to map to.

  • clearObject Boolean

    Specify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.

  • excludeEmptyFields Boolean

    Specify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.

  • excludeFlowFields Boolean

    Specify true of you want to skip flow fields.

  • excludeSystemFields Boolean

    Specify true of you want to skip system fields like Created, Modified. The SystemId field is always transferred.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJObject: JsonObject; mapDict: Dictionary of [Text, Integer]; clearObject: Boolean): Boolean

Maps the field values of a Record Reference to a JsonObject. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJObject JsonObject

    The target Json object to map to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • clearObject Boolean

    Specify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJObject: JsonObject; mapDict: Dictionary of [Text, Integer]): Boolean

Maps the field values of a Record Reference to a JsonObject. Only fields contained in the mapping dictionary are mapped. The object is cleared before transferring data.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJObject JsonObject

    The target Json object to map to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJObject: JsonObject; clearObject: Boolean): Boolean

Maps the field values of a Record Reference to a JsonObject.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJObject JsonObject

    The target Json object to map to.

  • clearObject Boolean

    Specify true if you want to clear the toJObject before mapping or false if you want to add to the existing fields.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToObject

procedure MapRecordToObject(var fromRecRef: RecordRef; var toJObject: JsonObject): Boolean

Maps the field values of a Record Reference to a JsonObject. The object is cleared before transferring data.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJObject JsonObject

    The target Json object to map to.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToArray

procedure MapRecordToArray(var fromRecRef: RecordRef; var toJArray: JsonArray; mapDict: Dictionary of [Text, Integer];excludeEmptyFields: Boolean; parent: JsonToken): Boolean

Maps the field values of all Records of the Record Reference to a JsonArray. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJArray JsonArray

    The target Json array to add the Json Objects to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • excludeEmptyFields Boolean

    Specify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.

  • parent JsonToken

    The Json token of the parent object.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToArray

procedure MapRecordToArray(var fromRecRef: RecordRef; var toJArray: JsonArray; mapDict: Dictionary of [Text, Integer];excludeEmptyFields: Boolean): Boolean

Maps the field values of all Records of the Record Reference to a JsonArray. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJArray JsonArray

    The target Json array to add the Json Objects to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • excludeEmptyFields Boolean

    Specify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToArray

procedure MapRecordToArray(var fromRecRef: RecordRef; var toJArray: JsonArray;excludeEmptyFields: Boolean; excludeFlowFields: Boolean; excludeSystemFields: Boolean): Boolean

Maps the field values of all Records of the Record Reference to a JsonArray. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJArray JsonArray

    The target Json array to add the Json Objects to.

  • excludeEmptyFields Boolean

    Specify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.

  • excludeFlowFields Boolean

    Specify true of you want to skip flow fields.

  • excludeSystemFields Boolean

    Specify true of you want to skip system fields like Created, Modified. The SystemId field is always transferred.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToArray

procedure MapRecordToArray(var fromRecRef: RecordRef; var toJArray: JsonArray; mapDict: Dictionary of [Text, Integer]): Boolean

Maps the field values of all Records of the Record Reference to a JsonArray. Only fields contained in the mapping dictionary are mapped.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJArray JsonArray

    The target Json array to add the Json Objects to.

  • mapDict Dictionary[Text,Integer]

    A mapping Dictionary of [Text, Integer] with field names and field ids.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


MapRecordToArray

procedure MapRecordToArray(var fromRecRef: RecordRef; var toJArray: JsonArray): Boolean

Maps the field values of all Records of the Record Reference to a JsonArray.

Parameters / Return Value

  • fromRecRef RecordRef

    The Record Reference with the fields to map.

  • toJArray JsonArray

    The target Json array to add the Json Objects to.

  • Returns Boolean

    Returns true if mapping was successful, false otherwise.


ApplyParent

procedure ApplyParent(object: JsonToken; parent: JsonToken)

Applies a Parent path value to a complete Json structure by traversing through all objects and arrays.

Parameters / Return Value

  • object JsonToken

    The Json object structure to apply the parent to.

  • parent JsonToken

    The Json token of the parent object.


ApplyParent

procedure ApplyParent(object: JsonToken)

Applies a Parent path value to a complete Json structure by traversing through all objects and arrays.

Parameters / Return Value

  • object JsonToken

    The Json object structure to apply the parent to.


ValueToTypedValue

procedure ValueToTypedValue(var value: Variant; typeName: Text): Boolean

Convert an untyped variant value to a typed value based on typeName.

Parameters / Return Value

  • value Variant

    Variant value to convert.

  • typeName Text

    Data Type name

  • Returns Boolean

    Returns true on success, false otherwise.



EOS Labs -