Codeunit 18060470 EOS054 AppData Reader

Codeunit 18060470 EOS054 AppData Reader

Provides a simple way to download public and default data from the AppData repository.

Methods

BranchName

procedure BranchName(): Text

Gets the name of the branch of the AppData repository to use when downloading data. If nothing has been explicitly specified, master will be used.

Parameters / Return Value

  • Returns Text

BranchName

procedure BranchName(NewValue: Text)

Sets the name of the branch of the AppData repository to use when downloading data. Set this to '’ (empty string) to use the default branch (master).

Parameters / Return Value

  • NewValue Text

SetAppFromCaller

procedure SetAppFromCaller()

Initializes for which app data should be downloaded by using whichever app is calling this. You must initialize an instance of the codeunit with an app before you can use it.


App

procedure App(mi: ModuleInfo)

Initializes for which app data should be downloaded. You must initialize an instance of the codeunit with an app before you can use it.

Parameters / Return Value

  • mi ModuleInfo

App

procedure App(): ModuleInfo

Gets for which app the should be downloaded.

Parameters / Return Value

  • Returns ModuleInfo

ClearLanguage

procedure ClearLanguage()

Removes the language from the request URI.


LanguageByCode

procedure LanguageByCode(LanguageCode: Code[10])

Sets the language subfolder for which the file should be downloaded using a BC language code. If this is not specified, the file will be downloaded from the root folder without a language subfolder.

Parameters / Return Value

  • LanguageCode Code[10]

LanguageById

procedure LanguageById(LanguageId: Integer)

Sets the language subfolder for which the file should be downloaded using a LCID (Windows Language ID). If this is not specified, the file will be downloaded from the root folder without a language subfolder.

Parameters / Return Value

  • LanguageId Integer

Language

procedure Language(NewValue: Text)

Sets the language subfolder for which the file should be downloaded by explicitly specifying the subfolder. If this is not specified, the file will be downloaded from the root folder without a language subfolder.

Parameters / Return Value

  • NewValue Text

Language

procedure Language(): Text

Returns the language subfolder to use when downloading files.

Parameters / Return Value

  • Returns Text

DownloadFileAsBlob

procedure DownloadFileAsBlob(Folder: Text; Filename: Text; var TempBlob: Codeunit "Temp Blob")

Downloads the given file from the AppData repository and returns it as a blob. This is a TryFunction.

Parameters / Return Value

  • Folder Text

    The folder the file is in. Leave this empty if the file is in the root folder.

  • Filename Text

    The name of the file to download.

  • TempBlob Codeunit "Temp Blob"

    The result as a blob.


DownloadFileAsXml

procedure DownloadFileAsXml(Folder: Text; Filename: Text; var Result: XmlDocument)

Downloads the given file from the AppData repository and returns it as an XML document. This is a TryFunction.

Parameters / Return Value

  • Folder Text

    The folder the file is in. Leave this empty if the file is in the root folder.

  • Filename Text

    The name of the file to download.

  • Result XmlDocument

    The result as an XML document.


DownloadFileAsJsonArray

procedure DownloadFileAsJsonArray(Folder: Text; Filename: Text; var Result: JsonArray)

Downloads the given file from the AppData repository and returns it as a JSON array. This is a TryFunction.

Parameters / Return Value

  • Folder Text

    The folder the file is in. Leave this empty if the file is in the root folder.

  • Filename Text

    The name of the file to download.

  • Result JsonArray

    The result as a JSON array.


DownloadFileAsJsonObject

procedure DownloadFileAsJsonObject(Folder: Text; Filename: Text; var Result: JsonObject)

Downloads the given file from the AppData repository and returns it as a JSON object. This is a TryFunction.

Parameters / Return Value

  • Folder Text

    The folder the file is in. Leave this empty if the file is in the root folder.

  • Filename Text

    The name of the file to download.

  • Result JsonObject

    The result as a JSON object.


DownloadFileAsText

procedure DownloadFileAsText(Folder: Text; Filename: Text; var Result: Text)

Downloads the given file from the AppData repository and returns it as a plain string. This is a TryFunction.

Parameters / Return Value

  • Folder Text

    The folder the file is in. Leave this empty if the file is in the root folder.

  • Filename Text

    The name of the file to download.

  • Result Text

    The result as a plain string.


GetLastCommitDateTime

procedure GetLastCommitDateTime(Folder: Text; Filename: Text; var LastCommitDateTime: DateTime)

Returns the date/time of the last commit for the given file in the repository. This is a TryFunction.

Parameters / Return Value

  • Folder Text

    The folder the file is in. Leave this empty if the file is in the root folder.

  • Filename Text

    The name of the file to download.

  • LastCommitDateTime DateTime

    The last date/time the file was committed. If the file does not exist 0DT will be returned.



EOS Labs -