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
JsonObjectJsonObject: The object to retrieve the field from
keyName
Text[]Text: The name of the key
raiseError
BooleanBoolean: If the key is not found, raise an error
Returns
JsonTokenJsonToken
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
JsonObjectJsonObject: The object to retrieve the field from
keyName
Text[]Text: The name of the key
Returns
JsonTokenJsonToken
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
JsonObjectJsonObject: The object to select the path from
path
Text[]Text: The path to find/return
returnJToken
JsonTokenJsonToken: The selected return JsonToken
Returns
BooleanBoolean
SelectJsonToken
procedure SelectJsonToken(jObject: JsonObject; path: Text): JsonToken
Returns the JsonValue from a JsonObject path for easier value handling.
Parameters / Return Value
jObject
JsonObjectJsonObject: The object to select the path from
path
Text[]Text: The path to find/return
Returns
JsonTokenJsonToken
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
JsonObjectJsonObject: The object to retrieve the field from
keyName
Text[]Text: The name of the key
raiseError
BooleanBoolean: If the key is not found, raise an error
Returns
JsonValueJsonValue
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
JsonObjectJsonObject: The object to retrieve the field from
keyName
Text[]Text: The name of the key
Returns
JsonValueJsonValue
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
JsonObjectJsonObject: The object to select the path from
path
Text[]Text: The path to find/return
returnJValue
JsonValueJsonObject: The selected return object
Returns
BooleanBoolean
SelectJsonValue
procedure SelectJsonValue(jObject: JsonObject; path: Text): JsonValue
Returns the JsonValue from a JsonObject path for easier value handling.
Parameters / Return Value
jObject
JsonObjectJsonObject: The object to select the path from
path
Text[]Text: The path to find/return
Returns
JsonValueJsonValue
Variant2Type
procedure Variant2Type(value: Variant; var typeJToken: JsonToken): Boolean
Convert a variant to the corresponding type JsonToken.
Parameters / Return Value
value
VariantVariant
typeJToken
JsonTokenJsonToken
Returns
BooleanBoolean
Variant2JsonToken
procedure Variant2JsonToken(value: Variant; var jToken: JsonToken): Boolean
Convert a variant to the corresponding JsonToken.
Parameters / Return Value
value
VariantVariant
jToken
JsonTokenJsonToken
Returns
BooleanBoolean
Variant2JsonValue
procedure Variant2JsonValue(value: Variant; var jValue: JsonValue): Boolean
Convert a variant to the corresponding JsonValue.
Parameters / Return Value
value
VariantVariant
jValue
JsonValueJsonValue
Returns
BooleanBoolean
JTokenAsVariant
procedure JTokenAsVariant(jToken: JsonToken; dataType: Variant; var value: Variant): Boolean
Convert a JsonToken to a Variant.
Parameters / Return Value
jToken
JsonTokenJsonToken
dataType
VariantVariant
value
VariantVariant
Returns
BooleanBoolean
JTokenAsBoolean
procedure JTokenAsBoolean(jToken: JsonToken): Boolean
Return a JsonToken as Boolean.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
BooleanBoolean
JTokenAsInteger
procedure JTokenAsInteger(jToken: JsonToken): Integer
Return a JsonToken as Integer.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
IntegerInteger
JTokenAsBigInteger
procedure JTokenAsBigInteger(jToken: JsonToken): BigInteger
Return a JsonToken as BigInteger.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
BigIntegerBigInteger
JTokenAsDecimal
procedure JTokenAsDecimal(jToken: JsonToken): Decimal
Return a JsonToken as Decimal.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
DecimalDecimal
JTokenAsTime
procedure JTokenAsTime(jToken: JsonToken): Time
Return a JsonToken as Time.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
TimeTime
JTokenAsDate
procedure JTokenAsDate(jToken: JsonToken): Date
Return a JsonToken as Date.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
DateDate
JTokenAsDateTime
procedure JTokenAsDateTime(jToken: JsonToken): DateTime
Return a JsonToken as DateTime.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
DateTimeDateTime
JTokenAsDuration
procedure JTokenAsDuration(jToken: JsonToken): Duration
Return a JsonToken as Duration.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
DurationDuration
JTokenAsGuid
procedure JTokenAsGuid(jToken: JsonToken): Guid
Return a JsonToken as Guid.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
GuidGuid
JTokenAsByte
procedure JTokenAsByte(jToken: JsonToken): Byte
Return a JsonToken as Byte.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
ByteByte
JTokenAsChar
procedure JTokenAsChar(jToken: JsonToken): Char
Return a JsonToken as Char.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
CharChar
JTokenAsText
procedure JTokenAsText(jToken: JsonToken): Text
Return a JsonToken as Text.
Parameters / Return Value
jToken
JsonTokenJsonToken
Returns
Text[]Text
JTokenAsCode
procedure JTokenAsCode(jToken: JsonToken): Code[2048]
Return a JsonToken as Code.
Parameters / Return Value
jToken
JsonTokenJsonToken
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
JsonObjectJsonObject
toRecRef
RecordRefRecordRef
returnMapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
Returns
BooleanReturn 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
RecordRefRecordRef
excludeFlowFields
BooleanBoolean
excludeSystemFields
BooleanBoolean
returnMapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
Returns
BooleanReturn 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
IntegerInteger.
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
JsonObjectJsonObject
skipValidate
BooleanBoolean
toRecRef
RecordRefRecordRef
mapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
forceFieldMatch
BooleanBoolean
clearRecord
BooleanBoolean
Returns
BooleanBoolean
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
JsonObjectJsonObject
toRecRef
RecordRefRecordRef
mapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
forceFieldMatch
BooleanBoolean
clearRecord
BooleanBoolean
Returns
BooleanBoolean
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
JsonObjectJsonObject
skipValidate
BooleanBoolean
toRecRef
RecordRefRecordRef
mapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
forceFieldMatch
BooleanBoolean
Returns
BooleanBoolean
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
JsonObjectJsonObject
toRecRef
RecordRefRecordRef
mapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
forceFieldMatch
BooleanBoolean
Returns
BooleanBoolean
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
JsonObjectJsonObject
skipValidate
BooleanBoolean
toRecRef
RecordRefRecordRef
mapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
Returns
BooleanBoolean
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
JsonObjectJsonObject
toRecRef
RecordRefRecordRef
mapDict
Dictionary[Text,Integer]Dictionary of [Text, Integer]
Returns
BooleanBoolean
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
JsonObjectJsonObject
skipValidate
BooleanBoolean
toRecRef
RecordRefRecordRef
forceFieldMatch
BooleanBoolean
Returns
BooleanBoolean
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
JsonObjectJsonObject
toRecRef
RecordRefRecordRef
forceFieldMatch
BooleanBoolean
Returns
BooleanBoolean
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
JsonObjectJsonObject
skipValidate
BooleanBoolean
toRecRef
RecordRefRecordRef
Returns
BooleanBoolean
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
JsonObjectJsonObject
toRecRef
RecordRefRecordRef
Returns
BooleanBoolean
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
JsonArrayThe source Json array to get the values from.
skipValidate
BooleanBoolean
toRecRef
RecordRefThe 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
BooleanIf true, and there is anything unmatched, an error is raised.
Returns
BooleanReturns 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
JsonArrayThe source Json array to get the values from.
toRecRef
RecordRefThe 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
BooleanIf true, and there is anything unmatched, an error is raised.
Returns
BooleanReturns 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
JsonArrayThe source Json array to get the values from.
skipValidate
BooleanBoolean
toRecRef
RecordRefThe Record Reference to which the values should be applied and saved.
forceFieldMatch
BooleanIf true, and there is anything unmatched, an error is raised.
Returns
BooleanReturns 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
JsonArrayThe source Json array to get the values from.
toRecRef
RecordRefThe Record Reference to which the values should be applied and saved.
forceFieldMatch
BooleanIf true, and there is anything unmatched, an error is raised.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJObject
JsonObjectThe target Json object to map to.
mapDict
Dictionary[Text,Integer]A mapping Dictionary of [Text, Integer] with field names and field ids.
clearObject
BooleanSpecify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.
excludeEmptyFields
BooleanSpecify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.
parent
JsonTokenThe Json token of the parent object.
Returns
BooleanReturns 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
RecordRefThe 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
BooleanSpecify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.
excludeEmptyFields
BooleanSpecify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.
parent
JsonTokenThe Json token of the parent object.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJObject
JsonObjectThe target Json object to map to.
mapDict
Dictionary[Text,Integer]A mapping Dictionary of [Text, Integer] with field names and field ids.
clearObject
BooleanSpecify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.
excludeEmptyFields
BooleanSpecify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJObject
JsonObjectThe target Json object to map to.
clearObject
BooleanSpecify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.
excludeEmptyFields
BooleanSpecify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.
excludeFlowFields
BooleanSpecify true of you want to skip flow fields.
excludeSystemFields
BooleanSpecify true of you want to skip system fields like Created, Modified. The SystemId field is always transferred.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJObject
JsonObjectThe target Json object to map to.
mapDict
Dictionary[Text,Integer]A mapping Dictionary of [Text, Integer] with field names and field ids.
clearObject
BooleanSpecify true of you want to clear the toJObject before mapping or false if you want to add to the existing fields.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJObject
JsonObjectThe target Json object to map to.
mapDict
Dictionary[Text,Integer]A mapping Dictionary of [Text, Integer] with field names and field ids.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJObject
JsonObjectThe target Json object to map to.
clearObject
BooleanSpecify true if you want to clear the toJObject before mapping or false if you want to add to the existing fields.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJObject
JsonObjectThe target Json object to map to.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJArray
JsonArrayThe 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
BooleanSpecify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.
parent
JsonTokenThe Json token of the parent object.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJArray
JsonArrayThe 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
BooleanSpecify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJArray
JsonArrayThe target Json array to add the Json Objects to.
excludeEmptyFields
BooleanSpecify true of you want to skip empty fields. Emptieness is determined by comparing to an empty RecordRef.
excludeFlowFields
BooleanSpecify true of you want to skip flow fields.
excludeSystemFields
BooleanSpecify true of you want to skip system fields like Created, Modified. The SystemId field is always transferred.
Returns
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJArray
JsonArrayThe 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
BooleanReturns 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
RecordRefThe Record Reference with the fields to map.
toJArray
JsonArrayThe target Json array to add the Json Objects to.
Returns
BooleanReturns 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
JsonTokenThe Json object structure to apply the parent to.
parent
JsonTokenThe 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
JsonTokenThe 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
VariantVariant value to convert.
typeName
Text[]Data Type name
Returns
BooleanReturns true on success, false otherwise.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.