Codeunit 5505368 M365 Value Storage
Codeunit 5505368 M365 Value Storage
Methods
SetDoNotRaiseErrorOnMissingValue
procedure SetDoNotRaiseErrorOnMissingValue(newDoNotRaiseErrorOnMissingValue: Boolean)
Specify that no errors should be shown, if a requested value could not be found. Use this setting with caution and only in situations, where a value is purely optional. This setting will overrule and ignore checks to ensure integrity and that Set() and Get() are used in pairs.
Parameters / Return Value
newDoNotRaiseErrorOnMissingValue
BooleanBoolean
SetPersistation
procedure SetPersistation(newPersistation: Boolean)
This setting allows further write/set operations to persist settings in a table on a per user basis. This value is reset after every operation to avoid failures.
Parameters / Return Value
newPersistation
BooleanBoolean
GetPersistation
procedure GetPersistation(): Boolean
Get the current value for persistation.
Parameters / Return Value
Returns
BooleanBoolean
SetValue
procedure SetValue(storageKey: Text[250]; value: Variant; force: Boolean)
Set a value for the specified storage key. Use the force parameter to overwrite any values already set for this storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
value
VariantVariant
force
BooleanBoolean
SetValue
procedure SetValue(storageKey: Text[250]; value: Variant)
Set a value for the specified storage key. An error is raised if the storage key already exists.
Parameters / Return Value
storageKey
Text[250]Text[250]
value
VariantVariant
SetValue
procedure SetValue(relatedVariant: Variant; storageKey: Text[250]; value: Variant; force: Boolean)
Set a value related to a specific record/variant and for the specified storage key. Use the force parameter to overwrite any values already set for this storage key.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
value
VariantVariant
force
BooleanBoolean
SetValue
procedure SetValue(relatedVariant: Variant; storageKey: Text[250]; value: Variant)
Set a value related to a specific record/variant and for the specified storage key. An error is raised if the storage key already exists.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
value
VariantVariant
HasValue
procedure HasValue(storageKey: Text[250]): Boolean
Returns true if the specified storage key already exists.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
BooleanBoolean
HasValue
procedure HasValue(relatedVariant: Variant; storageKey: Text[250]): Boolean
Returns true if the specified storage key related to the variant/record already exists.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
BooleanBoolean
GetValue
procedure GetValue(storageKey: Text[250]; var value: Variant): Boolean
Reads the value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
value
VariantVariant
Returns
BooleanBoolean
GetValue
procedure GetValue(relatedVariant: Variant; storageKey: Text[250]; var value: Variant): Boolean
Reads the value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
value
VariantVariant
Returns
BooleanBoolean
GetValue
procedure GetValue(storageKey: Text[250]; var returnValue: JsonValue): Boolean
Returns the value for the specified storage key as a JsonValue.
Parameters / Return Value
storageKey
Text[250]Text[250]
returnValue
JsonValueJsonValue
Returns
BooleanBoolean
GetValue
procedure GetValue(relatedVariant: Variant; storageKey: Text[250]; var returnValue: JsonValue): Boolean
Reads the JsonValue for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
returnValue
JsonValueJsonValue
Returns
BooleanBoolean
GetValue
procedure GetValue(relatedVariant: Variant; storageKey: Text[250]): JsonValue
Reads the JsonValue for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
JsonValueJsonValue
GetValue
procedure GetValue(storageKey: Text[250]): JsonValue
Returns the value for the specified storage key as a JsonValue.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
JsonValueJsonValue
GetTextValue
procedure GetTextValue(storageKey: Text[250]): Text
Returns the text value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
Text[]Text
GetTextValue
procedure GetTextValue(relatedVariant: Variant; storageKey: Text[250]): Text
Returns the text value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
Text[]Text
GetDecimalValue
procedure GetDecimalValue(storageKey: Text[250]): Decimal
Returns the decimal value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
DecimalDecimal
GetDecimalValue
procedure GetDecimalValue(relatedVariant: Variant; storageKey: Text[250]): Decimal
Returns the decimal value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
DecimalDecimal
GetIntegerValue
procedure GetIntegerValue(storageKey: Text[250]): Integer
Returns the integer value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
IntegerInteger
GetIntegerValue
procedure GetIntegerValue(relatedVariant: Variant; storageKey: Text[250]): Integer
Returns the integer value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
IntegerInteger
GetDateValue
procedure GetDateValue(storageKey: Text[250]): Date
Returns the date value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
DateDate
GetDateValue
procedure GetDateValue(relatedVariant: Variant; storageKey: Text[250]): Date
Returns the date value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
DateDate
GetTimeValue
procedure GetTimeValue(storageKey: Text[250]): Time
Returns the time value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
TimeTime
GetTimeValue
procedure GetTimeValue(relatedVariant: Variant; storageKey: Text[250]): Time
Returns the time value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
TimeTime
GetDateTimeValue
procedure GetDateTimeValue(storageKey: Text[250]): DateTime
Returns the datetime value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
DateTimeDateTime
GetDateTimeValue
procedure GetDateTimeValue(relatedVariant: Variant; storageKey: Text[250]): DateTime
Returns the datetime value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
DateTimeDateTime
GetGuidValue
procedure GetGuidValue(storageKey: Text[250]): Guid
Returns the Guid value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
GuidGuid
GetGuidValue
procedure GetGuidValue(relatedVariant: Variant; storageKey: Text[250]): Guid
Returns the Guid value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
GuidGuid
GetBooleanValue
procedure GetBooleanValue(storageKey: Text[250]): Boolean
Returns the boolean value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
Returns
BooleanBoolean
GetBooleanValue
procedure GetBooleanValue(relatedVariant: Variant; storageKey: Text[250]): Boolean
Returns the boolean value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
Returns
BooleanBoolean
RemoveValue
procedure RemoveValue(storageKey: Text[250])
Removes the value for the specified storage key.
Parameters / Return Value
storageKey
Text[250]Text[250]
RemoveValue
procedure RemoveValue(relatedVariant: Variant; storageKey: Text[250])
Removes the value for the specified storage key related to the variant/record.
Parameters / Return Value
relatedVariant
VariantVariant
storageKey
Text[250]Text[250]
ShowStorage
procedure ShowStorage()
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.