Codeunit "Upgrade Tag"
The interface for registering upgrade tags. Format of the upgrade tag is: [CompanyPrefix]-[TFSID]-[Description]-[YYYYMMDD] Example: MS-29901-UpdateGLEntriesIntegrationRecordIDs-20161206
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
| Permissions | tabledata "Upgrade Tags" = rimd |
Methods
HasUpgradeTag
Verifies if the upgrade tag exists.
procedure HasUpgradeTag(Tag: Code[250]): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Tag | Code[250] |
Tag code to check |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the Tag with given code exist. |
HasUpgradeTag
Verifies if the upgrade tag exists.
procedure HasUpgradeTag(Tag: Code[250], TagCompanyName: Code[30]): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Tag | Code[250] |
Tag code to check |
| TagCompanyName | Code[30] |
Name of the company to check existance of tag |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the Tag with given code exist. |
HasDatabaseUpgradeTag
Verifies if the database upgrade tag exists.
procedure HasDatabaseUpgradeTag(Tag: Code[250]): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Tag | Code[250] |
Tag code to check |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the Tag with the given code exists. |
SetDatabaseUpgradeTag
Sets the upgrade tag for database upgrades.
procedure SetDatabaseUpgradeTag(NewTag: Code[250])
Parameters
| Name | Type | Description |
|---|---|---|
| NewTag | Code[250] |
Tag code to save |
SetUpgradeTag
Sets the upgrade tag.
procedure SetUpgradeTag(NewTag: Code[250])
Parameters
| Name | Type | Description |
|---|---|---|
| NewTag | Code[250] |
Tag code to save |
SetSkippedUpgrade
Sets the upgrade tag to skipped.
procedure SetSkippedUpgrade(ExistingTag: Code[250], SkipUpgrade: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ExistingTag | Code[250] |
Tag code to set the Skipped Upgrade field |
| SkipUpgrade | Boolean |
Sets the Skipped Upgrade field |
SetSkippedUpgrade
Sets the upgrade tag to skipped.
procedure SetSkippedUpgrade(ExistingTag: Code[250], TagCompanyName: Code[30], SkipUpgrade: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ExistingTag | Code[250] |
Tag code to set the Skipped Upgrade field |
| TagCompanyName | Code[30] |
Name of the company to check existance of tag |
| SkipUpgrade | Boolean |
Sets the Skipped Upgrade field |
HasUpgradeTagSkipped
Check if the upgrade tag is skipped.
procedure HasUpgradeTagSkipped(ExistingTag: Code[250], TagCompanyName: Code[30]): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| ExistingTag | Code[250] |
Tag code to set the Skipped Upgrade field |
| TagCompanyName | Code[30] |
Name of the company to check existance of tag |
Returns
| Type | Description |
|---|---|
| Boolean |
SetAllUpgradeTags
This method should be used to set all upgrade tags in a new company. The method is called from codeunit 2 - Company Initialize.
procedure SetAllUpgradeTags()
SetAllUpgradeTags
This method should be used to set all upgrade tags in a new company.
procedure SetAllUpgradeTags(NewCompanyName: Code[30])
Parameters
| Name | Type | Description |
|---|---|---|
| NewCompanyName | Code[30] |
Name of the company set the upgrade tags |
CopyUpgradeTags
This method should be used to copy all upgrade tags from a company to another company.
procedure CopyUpgradeTags(FromCompanyName: Code[30], ToCompanyName: Code[30])
Parameters
| Name | Type | Description |
|---|---|---|
| FromCompanyName | Code[30] |
Name of the company from which to take the upgrade tags. |
| ToCompanyName | Code[30] |
Name of the company to which to copy the upgrade tags. |
GetPerCompanyUpgradeTags
With this method you get all the upgrade tags by company in a list.
procedure GetPerCompanyUpgradeTags(var PerCompanyUpgradeTags: List of [Code[250]])
Parameters
| Name | Type | Description |
|---|---|---|
| PerCompanyUpgradeTags | List of [Code[250]] |
List of upgrade tags that should be inserted if they do not exist. |
GetPerDatabaseUpgradeTags
With this method you get all the upgrade tags by database in a list.
procedure GetPerDatabaseUpgradeTags(var PerDatabaseUpgradeTags: List of [Code[250]])
Parameters
| Name | Type | Description |
|---|---|---|
| PerDatabaseUpgradeTags | List of [Code[250]] |
BackupUpgradeTags
This function is used for cloud migration to backup upgrade tags before cloud migration is triggered. Using the function if cloud migration is not enabled will throw an error.
procedure BackupUpgradeTags(): Integer
Returns
| Type | Description |
|---|---|
| Integer |
ID of the backup, used in |
RestoreUpgradeTagsFromBackup
This function is used to restore Upgrade tags after cloud migration. Using the function if cloud migration is not enabled will throw an error.
procedure RestoreUpgradeTagsFromBackup(BackupId: Integer, RestoreMissingTagsOnly: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| BackupId | Integer |
ID of the backup, created by |
| RestoreMissingTagsOnly | Boolean |
This parameter indicates if the function should restore the entire table or only insert back the missing upgrade tags. |
Events
OnGetPerCompanyUpgradeTags
Use this event if you want to add upgrade tag for PerCompany upgrade method for a new company.
[IntegrationEvent(False,False)]
internal procedure OnGetPerCompanyUpgradeTags(var PerCompanyUpgradeTags: List of [Code[250]])
Parameters
| Name | Type | Description |
|---|---|---|
| PerCompanyUpgradeTags | List of [Code[250]] |
List of upgrade tags that should be inserted if they do not exist. |
OnGetPerDatabaseUpgradeTags
Use this event if you want to add upgrade tag for PerDatabase upgrade method for a new company.
[IntegrationEvent(False,False)]
internal procedure OnGetPerDatabaseUpgradeTags(var PerDatabaseUpgradeTags: List of [Code[250]])
Parameters
| Name | Type | Description |
|---|---|---|
| PerDatabaseUpgradeTags | List of [Code[250]] |
List of upgrade tags that should be inserted if they do not exist. |
OnSetAllUpgradeTags
Use this event if you want to skip or run logic when we register all tags for a company.
[IntegrationEvent(False,False)]
internal procedure OnSetAllUpgradeTags(NewCompanyName: Text, var SkipSetAllUpgradeTags: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| NewCompanyName | Text |
Name of the company to set the upgrade tags. |
| SkipSetAllUpgradeTags | Boolean |
Specifies if the setting of the tags for the company should be skipped. |