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[]The name of the branch to use.
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[]The name of the branch to use.
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
ModuleInfoThe app for which data should be downloaded.
App
procedure App(): ModuleInfo
Gets for which app the should be downloaded.
Parameters / Return Value
Returns
ModuleInfoThe app for which data should be downloaded.
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]The language code to use. If this is empty, the language will be cleared.
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
IntegerThe LCID (Windows Language ID) to use. If this is 0, the language will be cleared.
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[]The language subfolder to use. If this is empty, the language will be cleared.
Language
procedure Language(): Text
Returns the language subfolder to use when downloading files.
Parameters / Return Value
Returns
Text[]The language subfolder to use. If this is empty, no language subfolder will be used.
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
XmlDocumentThe 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
JsonArrayThe 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
JsonObjectThe 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
DateTimeThe last date/time the file was committed. If the file does not exist 0DT will be returned.
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.