Skip to content
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 @@ -426,6 +426,8 @@ codeunit 8351 "MCP Config Implementation"
exit;

repeat
if CheckAPIToolExists(ConfigId, PageMetadata.ID) then
continue;
CreateAPITool(ConfigId, PageMetadata.ID, false);
until PageMetadata.Next() = 0;
end;
Expand All @@ -442,10 +444,22 @@ codeunit 8351 "MCP Config Implementation"
exit;

repeat
if CheckAPIToolExists(ConfigId, PageMetadata.ID) then
continue;
CreateAPITool(ConfigId, PageMetadata.ID, false);
until PageMetadata.Next() = 0;
end;

local procedure CheckAPIToolExists(ConfigId: Guid; PageId: Integer): Boolean
var
MCPConfigurationTool: Record "MCP Configuration Tool";
begin
MCPConfigurationTool.SetRange(ID, ConfigId);
MCPConfigurationTool.SetRange("Object Type", MCPConfigurationTool."Object Type"::Page);
MCPConfigurationTool.SetRange("Object ID", PageId);
exit(not MCPConfigurationTool.IsEmpty());
end;

internal procedure GetObjectCaption(ToolId: Guid): Text[100]
var
MCPConfigurationTool: Record "MCP Configuration Tool";
Expand Down
Loading