Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getting app ID for system objects #2104

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ codeunit 8333 "VS Code Integration Impl."
InherentPermissions = X;

var
AllObjWithCaption: Record AllObjWithCaption;
UriBuilder: Codeunit "Uri Builder";
VSCodeRequestHelper: DotNet VSCodeRequestHelper;
AlExtensionUriTxt: Label 'vscode://ms-dynamics-smb.al', Locked = true;
Expand Down Expand Up @@ -105,6 +104,8 @@ codeunit 8333 "VS Code Integration Impl."

[Scope('OnPrem')]
local procedure FormatObjectType(ObjectType: Option): Text
var
AllObjWithCaption: Record AllObjWithCaption;
begin
case ObjectType of
AllObjWithCaption."Object Type"::Page:
Expand All @@ -119,10 +120,15 @@ codeunit 8333 "VS Code Integration Impl."
[Scope('OnPrem')]
local procedure GetAppIdForObject(ObjectType: Option; ObjectId: Integer): Text
var
AllObjWithCaption: Record AllObjWithCaption;
NavAppInstalledApp: Record "NAV App Installed App";
EmptyGuid: Guid;
begin
// Objects in the system app range
if ObjectId >= 2000000000 then
exit(EmptyGuid);

if AllObjWithCaption.ReadPermission() then begin
blrobl marked this conversation as resolved.
Show resolved Hide resolved
AllObjWithCaption.Reset();
AllObjWithCaption.SetRange("Object Type", ObjectType);
AllObjWithCaption.SetRange("Object ID", ObjectId);

Expand Down
Loading