From 3b46c2a7ce6901c6b5d1a3511314043d0be25933 Mon Sep 17 00:00:00 2001 From: Thomas Williamson Date: Tue, 7 Jan 2025 16:41:28 +0100 Subject: [PATCH] Fix variable names --- .../app/src/SharePointAccountWizard.Page.al | 20 ++++---- .../src/SharePointConnectorImpl.Codeunit.al | 48 +++++++++---------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Apps/W1/File - SharePoint Connector/app/src/SharePointAccountWizard.Page.al b/Apps/W1/File - SharePoint Connector/app/src/SharePointAccountWizard.Page.al index 28fed97258..990d1e9d74 100644 --- a/Apps/W1/File - SharePoint Connector/app/src/SharePointAccountWizard.Page.al +++ b/Apps/W1/File - SharePoint Connector/app/src/SharePointAccountWizard.Page.al @@ -48,7 +48,7 @@ page 80301 "SharePoint Account Wizard" trigger OnValidate() begin - IsNextEnabled := FileShareConnectorImpl.IsAccountValid(Rec); + IsNextEnabled := SharePointConnectorImpl.IsAccountValid(Rec); end; } @@ -58,7 +58,7 @@ page 80301 "SharePoint Account Wizard" trigger OnValidate() begin - IsNextEnabled := FileShareConnectorImpl.IsAccountValid(Rec); + IsNextEnabled := SharePointConnectorImpl.IsAccountValid(Rec); end; } @@ -68,7 +68,7 @@ page 80301 "SharePoint Account Wizard" trigger OnValidate() begin - IsNextEnabled := FileShareConnectorImpl.IsAccountValid(Rec); + IsNextEnabled := SharePointConnectorImpl.IsAccountValid(Rec); end; } @@ -88,7 +88,7 @@ page 80301 "SharePoint Account Wizard" trigger OnValidate() begin - IsNextEnabled := FileShareConnectorImpl.IsAccountValid(Rec); + IsNextEnabled := SharePointConnectorImpl.IsAccountValid(Rec); end; } @@ -98,7 +98,7 @@ page 80301 "SharePoint Account Wizard" trigger OnValidate() begin - IsNextEnabled := FileShareConnectorImpl.IsAccountValid(Rec); + IsNextEnabled := SharePointConnectorImpl.IsAccountValid(Rec); end; } } @@ -131,7 +131,7 @@ page 80301 "SharePoint Account Wizard" trigger OnAction() begin - FileShareConnectorImpl.CreateAccount(Rec, ClientSecret, FileShareAccount); + SharePointConnectorImpl.CreateAccount(Rec, ClientSecret, SharePointAccount); CurrPage.Close(); end; } @@ -139,9 +139,9 @@ page 80301 "SharePoint Account Wizard" } var - FileShareAccount: Record "File Account"; + SharePointAccount: Record "File Account"; MediaResources: Record "Media Resources"; - FileShareConnectorImpl: Codeunit "SharePoint Connector Impl."; + SharePointConnectorImpl: Codeunit "SharePoint Connector Impl."; [NonDebuggable] ClientSecret: Text; IsNextEnabled: Boolean; @@ -160,10 +160,10 @@ page 80301 "SharePoint Account Wizard" internal procedure GetAccount(var FileAccount: Record "File Account"): Boolean begin - if IsNullGuid(FileShareAccount."Account Id") then + if IsNullGuid(SharePointAccount."Account Id") then exit(false); - FileAccount := FileShareAccount; + FileAccount := SharePointAccount; exit(true); end; diff --git a/Apps/W1/File - SharePoint Connector/app/src/SharePointConnectorImpl.Codeunit.al b/Apps/W1/File - SharePoint Connector/app/src/SharePointConnectorImpl.Codeunit.al index 4cc02aa0be..96ae077538 100644 --- a/Apps/W1/File - SharePoint Connector/app/src/SharePointConnectorImpl.Codeunit.al +++ b/Apps/W1/File - SharePoint Connector/app/src/SharePointConnectorImpl.Codeunit.al @@ -276,13 +276,13 @@ codeunit 80300 "SharePoint Connector Impl." implements "External File Storage Co /// The ID of the account to show. procedure ShowAccountInformation(AccountId: Guid) var - FileShareAccountLocal: Record "SharePoint Account"; + SharePointAccountLocal: Record "SharePoint Account"; begin - if not FileShareAccountLocal.Get(AccountId) then + if not SharePointAccountLocal.Get(AccountId) then Error(NotRegisteredAccountErr); - FileShareAccountLocal.SetRecFilter(); - Page.Run(Page::"SharePoint Account", FileShareAccountLocal); + SharePointAccountLocal.SetRecFilter(); + Page.Run(Page::"SharePoint Account", SharePointAccountLocal); end; /// @@ -292,11 +292,11 @@ codeunit 80300 "SharePoint Connector Impl." implements "External File Storage Co /// True if the registration was successful; false - otherwise. procedure RegisterAccount(var TempAccount: Record "File Account" temporary): Boolean var - FileShareAccountWizard: Page "SharePoint Account Wizard"; + SharePointAccountWizard: Page "SharePoint Account Wizard"; begin - FileShareAccountWizard.RunModal(); + SharePointAccountWizard.RunModal(); - exit(FileShareAccountWizard.GetAccount(TempAccount)); + exit(SharePointAccountWizard.GetAccount(TempAccount)); end; /// @@ -306,10 +306,10 @@ codeunit 80300 "SharePoint Connector Impl." implements "External File Storage Co /// True if an account was deleted. procedure DeleteAccount(AccountId: Guid): Boolean var - FileShareAccountLocal: Record "SharePoint Account"; + SharePointAccountLocal: Record "SharePoint Account"; begin - if FileShareAccountLocal.Get(AccountId) then - exit(FileShareAccountLocal.Delete()); + if SharePointAccountLocal.Get(AccountId) then + exit(SharePointAccountLocal.Delete()); exit(false); end; @@ -358,31 +358,31 @@ codeunit 80300 "SharePoint Connector Impl." implements "External File Storage Co internal procedure CreateAccount(var AccountToCopy: Record "SharePoint Account"; Password: SecretText; var TempFileAccount: Record "File Account" temporary) var - NewFileShareAccount: Record "SharePoint Account"; + NewileShPointareAccount: Record "SharePoint Account"; begin - NewFileShareAccount.TransferFields(AccountToCopy); + NewileShPointareAccount.TransferFields(AccountToCopy); - NewFileShareAccount.Id := CreateGuid(); - NewFileShareAccount.SetClientSecret(Password); + NewileShPointareAccount.Id := CreateGuid(); + NewileShPointareAccount.SetClientSecret(Password); - NewFileShareAccount.Insert(); + NewileShPointareAccount.Insert(); - TempFileAccount."Account Id" := NewFileShareAccount.Id; - TempFileAccount.Name := NewFileShareAccount.Name; + TempFileAccount."Account Id" := NewileShPointareAccount.Id; + TempFileAccount.Name := NewileShPointareAccount.Name; TempFileAccount.Connector := Enum::"Ext. File Storage Connector"::"SharePoint"; end; local procedure InitSharePointClient(var AccountId: Guid; var SharePointClient: Codeunit "SharePoint Client") var - FileShareAccount: Record "SharePoint Account"; + SharePointAccount: Record "SharePoint Account"; SharePointAuth: Codeunit "SharePoint Auth."; SharePointAuthorization: Interface "SharePoint Authorization"; Scopes: List of [Text]; begin - FileShareAccount.Get(AccountId); + SharePointAccount.Get(AccountId); Scopes.Add('00000003-0000-0ff1-ce00-000000000000/.default'); - SharePointAuthorization := SharePointAuth.CreateAuthorizationCode(Format(FileShareAccount."Tenant Id", 0, 4), Format(FileShareAccount."Client Id", 0, 4), FileShareAccount.GetClientSecret(FileShareAccount."Client Secret Key"), Scopes); - SharePointClient.Initialize(FileShareAccount."SharePoint Url", SharePointAuthorization); + SharePointAuthorization := SharePointAuth.CreateAuthorizationCode(Format(SharePointAccount."Tenant Id", 0, 4), Format(SharePointAccount."Client Id", 0, 4), SharePointAccount.GetClientSecret(SharePointAccount."Client Secret Key"), Scopes); + SharePointClient.Initialize(SharePointAccount."SharePoint Url", SharePointAuthorization); end; local procedure PathSeparator(): Text @@ -411,10 +411,10 @@ codeunit 80300 "SharePoint Connector Impl." implements "External File Storage Co local procedure InitPath(AccountId: Guid; var Path: Text) var - FileShareAccount: Record "SharePoint Account"; + SharePointAccount: Record "SharePoint Account"; begin - FileShareAccount.Get(AccountId); - Path := CombinePath(FileShareAccount."Base Relative Folder Path", Path); + SharePointAccount.Get(AccountId); + Path := CombinePath(SharePointAccount."Base Relative Folder Path", Path); end; local procedure CombinePath(Parent: Text; Child: Text): Text