Codeunit 70623699 EOS004 Environment Property

Codeunit 70623699 EOS004 Environment Property

Provides access to a database-wide key-value store. Any values in this store will be included in telemetry that is sent using codeunit EOS004 Telem. Payload Builder.

Methods

ToNameValueBuffer

procedure ToNameValueBuffer(var TempNameValueBuffer: Record "Name/Value Buffer")

Retrieves all key-value pairs and stores them in the provided temporary buffer.

Parameters / Return Value

  • TempNameValueBuffer Record "Name/Value Buffer"

    The temporary name/value buffer to populate.


List

procedure List(): Dictionary of [Text[250], Text[250]]

Retrieves all key-value pairs from the database and returns them as a dictionary. This method caches the results for subsequent calls to improve performance.

Parameters / Return Value

  • Returns Dictionary[Text,Text]

    The dictionary containing all key-value pairs.


Get

procedure Get(PropertyKey: Text[250]): Text[250]

Retrieves the value associated with the specified property key. If the key does not exist, an empty string is returned. This will also cache the result for subsequent calls.

Parameters / Return Value

  • PropertyKey Text[250]

    The key of the property to retrieve.

  • Returns Text[250]

    The value associated with the specified key, or an empty string if the key does not exist.


Set

procedure Set(PropertyKey: Text[250]; PropertyValue: Text[250])

Sets the value for the specified property key. This will cause the cache to be reset, so subsequent reads will reflect the new value.

Parameters / Return Value

  • PropertyKey Text[250]

    The key of the property to set.

  • PropertyValue Text[250]

    The value to set for the specified key.


Delete

procedure Delete(PropertyKey: Text[250]): Boolean

Deletes the property with the specified key, if it exists.

Parameters / Return Value

  • PropertyKey Text[250]

    The key of the property to delete.

  • Returns Boolean

    true if the property was deleted, false if it did not exist.


ResetCache

procedure ResetCache()

Resets the cache of key-value pairs.



EOS Labs -