Codeunit 18122325 EOS004 Upgrade Tags

Codeunit 18122325 EOS004 Upgrade Tags

Wrapper for upgrade tag management using the predefined EOS format.

Methods

SetApp

procedure SetApp(app: ModuleInfo)

Sets the app for which upgrade tags should be handled. This method must be called before any other method can be executed.

Parameters / Return Value

  • app ModuleInfo

    The app for which upgrade tags should be handled.


SetApp

procedure SetApp(app: ModuleInfo; isDatabaseUpgrade: Boolean)

Sets the app for which upgrade tags should be handled if the upgrade is for database. This method must be called before any other method can be executed.

Parameters / Return Value

  • app ModuleInfo

    The app for which upgrade tags should be handled.

  • isDatabaseUpgrade Boolean


SetAppFromCaller

procedure SetAppFromCaller()

Sets the app for which upgrade tags should be handled by using the caller’s app. This method must be called before any other method can be executed.


HasUpgradeTag

procedure HasUpgradeTag(WorkItemId: Integer): Boolean

Check if an upgrade tag for the specified work item exists.

Parameters / Return Value

  • WorkItemId Integer

    The ID of the work item.

  • Returns Boolean

    true if it exists, false otherwise.


HasUpgradeTag

procedure HasUpgradeTag(WorkItemId: Integer; Iteration: Integer): Boolean

Check if an upgrade tag for the specified work item and iteration exists.

Parameters / Return Value

  • WorkItemId Integer

    The ID of the work item.

  • Iteration Integer

    The number of the iteration. Defaults to 1.

  • Returns Boolean

    true if it exists, false otherwise.


SetUpgradeTag

procedure SetUpgradeTag(WorkItemId: Integer)

Creates an upgrade tag for the specified work item.

Parameters / Return Value

  • WorkItemId Integer

    The ID of the work item.


SetUpgradeTag

procedure SetUpgradeTag(WorkItemId: Integer; Iteration: Integer)

Creates an upgrade tag for the specified work item and iteration.

Parameters / Return Value

  • WorkItemId Integer

    The ID of the work item.

  • Iteration Integer

    The number of the iteration. Defaults to 1.


SetUpgradeTagIfNotExists

procedure SetUpgradeTagIfNotExists(WorkItemId: Integer; Iteration: Integer): Boolean

Creates an upgrade tag for the specified work item and iteration, if it not already exists.

Parameters / Return Value

  • WorkItemId Integer

    The ID of the work item.

  • Iteration Integer

    The number of the iteration. Defaults to 1.

  • Returns Boolean

    true if the upgrade tag did not exist and was created. false if the tag already existed.


SetUpgradeTagIfNotExists

procedure SetUpgradeTagIfNotExists(WorkItemId: Integer): Boolean

Creates an upgrade tag for the specified work item and iteration, if it not already exists.

Parameters / Return Value

  • WorkItemId Integer

    The ID of the work item.

  • Returns Boolean

    true if the upgrade tag did not exist and was created. false if the tag already existed.


BeginUpgrade

procedure BeginUpgrade(WorkItemId: Integer): Boolean

Starts an upgrade for the specified work item and returns true if the upgrade should proceed. If the upgrade tag already exists, false is returned and you should abort the upgrade. If an upgrade is already in progress, an error is thrown, upgrades must first be ended via EndUpgrade.

Parameters / Return Value

  • WorkItemId Integer

    The work item ID

  • Returns Boolean

    true if the tag did not yet exist and upgrade should proceed. False otherwise.


BeginUpgrade

procedure BeginUpgrade(WorkItemId: Integer; Iteration: Integer): Boolean

Starts an upgrade for the specified work item and iteration and returns true if the upgrade should proceed. If the upgrade tag already exists, false is returned and you should abort the upgrade. If an upgrade is already in progress, an error is thrown, upgrades must first be ended via EndUpgrade.

Parameters / Return Value

  • WorkItemId Integer

    The work item ID

  • Iteration Integer

    The iteration

  • Returns Boolean

    true if the tag did not yet exist and upgrade should proceed. False otherwise.


EndUpgrade

procedure EndUpgrade()

Stops the upgrade that was started via BeginUpgrade. This will log a message to telemetry and set the upgrade tag. If no upgrade is in progress, an error is thrown.


FormatTag

procedure FormatTag(WorkItemId: Integer): Code[250]

Returns an upgrade tag formatted according to EOS defined rules and specifications.

Parameters / Return Value

  • WorkItemId Integer

    The work item ID

  • Returns Code[250]

    The upgrade tag


FormatTag

procedure FormatTag(WorkItemId: Integer; Iteration: Integer): Code[250]

Returns an upgrade tag formatted according to EOS defined rules and specifications.

Parameters / Return Value

  • WorkItemId Integer

    The work item ID

  • Iteration Integer

    The iteration

  • Returns Code[250]

    The upgrade tag


MigratePermissionSet

procedure MigratePermissionSet(OldName: Code[20]; NewName: Code[20])

Migrates a users permission set from the old tenant scope to the new AL system scope.

Parameters / Return Value

  • OldName Code[20]

    The old name the permission set had in the XML file.

  • NewName Code[20]

    The name of the permission set in AL.


MigratePermissionSet

procedure MigratePermissionSet(OldName: Code[20]; NewName: Code[20]; Module: ModuleInfo)

Migrates a users permission set from the old tenant scope to the new AL system scope.

Parameters / Return Value

  • OldName Code[20]

    The old name the permission set had in the XML file.

  • NewName Code[20]

    The name of the permission set in AL.

  • Module ModuleInfo

    The app for which to migrate.



EOS Labs -