diff --git a/src/System Application/App/File System/permissions/FileSystemObjects.PermissionSet.al b/src/System Application/App/File System/permissions/FileSystemObjects.PermissionSet.al index 2fec87ddd6..8f13b834bf 100644 --- a/src/System Application/App/File System/permissions/FileSystemObjects.PermissionSet.al +++ b/src/System Application/App/File System/permissions/FileSystemObjects.PermissionSet.al @@ -7,8 +7,6 @@ permissionset 9452 "File System - Objects" Permissions = table "File Account" = X, - table "File System Connector" = X, - table "File System Connector Logo" = X, table "File Account Content" = X, table "File Account Scenario" = X, table "File Scenario" = X; diff --git a/src/System Application/App/File System/src/Account/FileAccountWizard.Page.al b/src/System Application/App/File System/src/Account/FileAccountWizard.Page.al index e9c07d3a37..680b7f9cd0 100644 --- a/src/System Application/App/File System/src/Account/FileAccountWizard.Page.al +++ b/src/System Application/App/File System/src/Account/FileAccountWizard.Page.al @@ -384,18 +384,18 @@ page 9451 "File Account Wizard" AccountWasRegistered: Boolean; ConnectorSucceeded: Boolean; CustomDimensions: Dictionary of [Text, Text]; - CTHLbl: Label '%1 account has been setup.', Locked = true; - CTILbl: Label '%1 account has failed to setup. Error: %2', Locked = true; + TelemetryAccountRegisteredLbl: Label '%1 account has been setup.', Locked = true; + TelemetryAccountFailedtoRegisterLbl: Label '%1 account has failed to setup. Error: %2', Locked = true; begin ConnectorSucceeded := TryRegisterAccount(AccountWasRegistered); CustomDimensions.Add('Category', FileCategoryLbl); if AccountWasRegistered then begin FeatureTelemetry.LogUptake('0000CTF', 'File Access', Enum::"Feature Uptake Status"::"Set up"); - Telemetry.LogMessage('0000CTH', StrSubstNo(CTHLbl, Rec.Connector), Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, CustomDimensions); + Telemetry.LogMessage('0000CTH', StrSubstNo(TelemetryAccountRegisteredLbl, Rec.Connector), Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, CustomDimensions); NextStep(false); end else begin - Telemetry.LogMessage('0000CTI', StrSubstNo(CTILbl, Rec.Connector, GetLastErrorCallStack()), Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, CustomDimensions); + Telemetry.LogMessage('0000CTI', StrSubstNo(TelemetryAccountFailedtoRegisterLbl, Rec.Connector, GetLastErrorCallStack()), Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, CustomDimensions); NextStep(true); end; diff --git a/src/System Application/App/File System/src/FileSystem/FileSystem.Codeunit.al b/src/System Application/App/File System/src/FileSystem/FileSystem.Codeunit.al index e7d839d6cb..4a0797dd24 100644 --- a/src/System Application/App/File System/src/FileSystem/FileSystem.Codeunit.al +++ b/src/System Application/App/File System/src/FileSystem/FileSystem.Codeunit.al @@ -174,11 +174,11 @@ codeunit 9454 "File System" /// /// Start path of the dialog. /// Returns the selected Folder. - procedure SelectFolderUI(Path: Text): Text + procedure SelectAndGetFolderPath(Path: Text): Text var - DefaultSelectFolderUILbl: Label 'Select a folder'; + DefaultSelectFolderLbl: Label 'Select a folder'; begin - exit(SelectFolderUI(Path, DefaultSelectFolderUILbl)); + exit(SelectAndGetFolderPath(Path, DefaultSelectFolderLbl)); end; /// @@ -187,9 +187,9 @@ codeunit 9454 "File System" /// Start path of the dialog. /// Title of the selection dialog. /// Returns the selected Folder. - procedure SelectFolderUI(Path: Text; DialogTitle: Text): Text + procedure SelectAndGetFolderPath(Path: Text; DialogTitle: Text): Text begin - exit(FileSystemImpl.SelectFolderUI(Path, DialogTitle)); + exit(FileSystemImpl.SelectAndGetFolderPath(Path, DialogTitle)); end; /// @@ -198,11 +198,11 @@ codeunit 9454 "File System" /// Start path. /// A filter string that applies only on files not on folders. /// Returns the path of the selected file. - procedure SelectFileUI(Path: Text; FileFilter: Text): Text + procedure SelectAndGetFilePath(Path: Text; FileFilter: Text): Text var DefaultSelectFileUILbl: Label 'Select a file'; begin - exit(SelectFileUI(Path, FileFilter, DefaultSelectFileUILbl)); + exit(SelectAndGetFilePath(Path, FileFilter, DefaultSelectFileUILbl)); end; /// @@ -212,9 +212,9 @@ codeunit 9454 "File System" /// A filter string that applies only on files not on folders. /// Title of the selection dialog. /// Returns the path of the selected file. - procedure SelectFileUI(Path: Text; FileFilter: Text; DialogTitle: Text): Text + procedure SelectAndGetFilePath(Path: Text; FileFilter: Text; DialogTitle: Text): Text begin - exit(FileSystemImpl.SelectFileUI(Path, FileFilter, DialogTitle)); + exit(FileSystemImpl.SelectAndGetFilePath(Path, FileFilter, DialogTitle)); end; /// @@ -223,11 +223,11 @@ codeunit 9454 "File System" /// Start path of the dialog. /// The file extension without dot (like pdf or txt). /// Returns the selected file path. - procedure SaveFileUI(Path: Text; FileExtension: Text): Text + procedure SaveFile(Path: Text; FileExtension: Text): Text var - DefaultSaveFileUITitleLbl: Label 'Save as'; + DefaultSaveFileTitleLbl: Label 'Save as'; begin - exit(SaveFileUI(Path, FileExtension, DefaultSaveFileUITitleLbl)); + exit(SaveFile(Path, FileExtension, DefaultSaveFileTitleLbl)); end; /// @@ -237,9 +237,9 @@ codeunit 9454 "File System" /// The file extension without dot (like pdf or txt). /// Title of the selection dialog. /// Returns the selected file path. - procedure SaveFileUI(Path: Text; FileExtension: Text; DialogTitle: Text): Text + procedure SaveFile(Path: Text; FileExtension: Text; DialogTitle: Text): Text begin - exit(FileSystemImpl.SaveFileUI(Path, FileExtension, DialogTitle)); + exit(FileSystemImpl.SaveFile(Path, FileExtension, DialogTitle)); end; /// diff --git a/src/System Application/App/File System/src/FileSystem/FileSystemImpl.Codeunit.al b/src/System Application/App/File System/src/FileSystem/FileSystemImpl.Codeunit.al index d89ec58c44..f898a2e880 100644 --- a/src/System Application/App/File System/src/FileSystem/FileSystemImpl.Codeunit.al +++ b/src/System Application/App/File System/src/FileSystem/FileSystemImpl.Codeunit.al @@ -37,80 +37,80 @@ codeunit 9455 "File System Impl." procedure ListFiles(Path: Text; FilePaginationData: Codeunit "File Pagination Data"; var FileAccountContent: Record "File Account Content" temporary) begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); FileSystemConnector.ListFiles(CurrFileAccount."Account Id", Path, FilePaginationData, FileAccountContent); end; procedure GetFile(Path: Text; Stream: InStream) begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); FileSystemConnector.GetFile(CurrFileAccount."Account Id", Path, Stream); end; procedure CreateFile(Path: Text; Stream: InStream) begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); FileSystemConnector.CreateFile(CurrFileAccount."Account Id", Path, Stream); end; procedure CopyFile(SourcePath: Text; TargetPath: Text) begin + CheckInitialization(); CheckPath(SourcePath); CheckPath(TargetPath); - CheckInitialization(); FileSystemConnector.CopyFile(CurrFileAccount."Account Id", SourcePath, TargetPath); end; procedure MoveFile(SourcePath: Text; TargetPath: Text) begin + CheckInitialization(); CheckPath(SourcePath); CheckPath(TargetPath); - CheckInitialization(); FileSystemConnector.MoveFile(CurrFileAccount."Account Id", SourcePath, TargetPath); end; procedure FileExists(Path: Text): Boolean begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); exit(FileSystemConnector.FileExists(CurrFileAccount."Account Id", Path)); end; procedure DeleteFile(Path: Text) begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); FileSystemConnector.DeleteFile(CurrFileAccount."Account Id", Path); end; procedure ListDirectories(Path: Text; FilePaginationData: Codeunit "File Pagination Data"; var FileAccountContent: Record "File Account Content" temporary) begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); FileSystemConnector.ListDirectories(CurrFileAccount."Account Id", Path, FilePaginationData, FileAccountContent); end; procedure CreateDirectory(Path: Text) begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); FileSystemConnector.CreateDirectory(CurrFileAccount."Account Id", Path); end; procedure DirectoryExists(Path: Text): Boolean begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); exit(FileSystemConnector.DirectoryExists(CurrFileAccount."Account Id", Path)); end; procedure DeleteDirectory(Path: Text) begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); FileSystemConnector.DeleteDirectory(CurrFileAccount."Account Id", Path); end; @@ -137,13 +137,13 @@ codeunit 9455 "File System Impl." ParentPath := Path.Substring(1, Path.LastIndexOf(PathSeparator())); end; - procedure SelectFolderUI(Path: Text; DialogTitle: Text): Text + procedure SelectAndGetFolderPath(Path: Text; DialogTitle: Text): Text var FileAccountContent: Record "File Account Content"; StorageBrowser: Page "Storage Browser"; begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); StorageBrowser.SetPageCaption(DialogTitle); StorageBrowser.SetFileAccount(CurrFileAccount); @@ -158,13 +158,13 @@ codeunit 9455 "File System Impl." exit(CombinePath(FileAccountContent."Parent Directory", FileAccountContent.Name)); end; - procedure SelectFileUI(Path: Text; FileFilter: Text; DialogTitle: Text): Text + procedure SelectAndGetFilePath(Path: Text; FileFilter: Text; DialogTitle: Text): Text var FileAccountContent: Record "File Account Content"; StorageBrowser: Page "Storage Browser"; begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); StorageBrowser.SetPageCaption(DialogTitle); StorageBrowser.SetFileAccount(CurrFileAccount); @@ -179,15 +179,15 @@ codeunit 9455 "File System Impl." exit(CombinePath(FileAccountContent."Parent Directory", FileAccountContent.Name)); end; - procedure SaveFileUI(Path: Text; FileExtension: Text; DialogTitle: Text): Text + procedure SaveFile(Path: Text; FileExtension: Text; DialogTitle: Text): Text var StorageBrowser: Page "Storage Browser"; FileName, FileNameWithExtension : Text; PleaseProvideFileExtensionErr: Label 'Please provide a valid file extension.'; FileNameTok: Label '%1.%2', Locked = true; begin - CheckPath(Path); CheckInitialization(); + CheckPath(Path); if FileExtension = '' then Error(PleaseProvideFileExtensionErr);