Skip to content

Commit

Permalink
#1978 HasDatabaseUpgradeTag (#2061)
Browse files Browse the repository at this point in the history
#### Summary <!-- Provide a general summary of your changes -->
Adds HasDatabaseUpgradeTag() procedure to make the setters and getters
the same.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #1978

---------

Co-authored-by: Jesper Schulz-Wedde <[email protected]>
Co-authored-by: Natalie Karolak, MVP <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent d9a8b69 commit 8792fb8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/System Application/App/Upgrade Tags/src/UpgradeTag.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ codeunit 9999 "Upgrade Tag"
exit(UpgradeTagImpl.HasUpgradeTag(Tag, TagCompanyName));
end;

/// <summary>
/// Verifies if the database upgrade tag exists.
/// </summary>
/// <param name="Tag">Tag code to check</param>
/// <returns>True if the Tag with the given code exists.</returns>
procedure HasDatabaseUpgradeTag(Tag: Code[250]): Boolean
begin
exit(UpgradeTagImpl.HasDatabaseUpgradeTag(Tag));
end;

/// <summary>
/// Sets the upgrade tag for database upgrades.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ codeunit 9996 "Upgrade Tag Impl."
exit(HasUpgradeTag(Tag, CopyStr(CompanyName(), 1, MaxStrLen(ConstUpgradeTags.Company))));
end;

procedure HasDatabaseUpgradeTag(Tag: Code[250]): Boolean
begin
exit(HasUpgradeTag(Tag, ''));
end;

procedure HasUpgradeTag(Tag: Code[250]; TagCompanyName: Code[30]): Boolean
var
UpgradeTags: Record "Upgrade Tags";
Expand Down

0 comments on commit 8792fb8

Please sign in to comment.