Codeunit 7760 Copilot Capability Install in 25
- App
- System Application
- Namespace
- System.AI
Versions171819202122232425262728latest
Source in 25
src/System Application/App/AI/src/Copilot/CopilotCapabilityInstall.Codeunit.al45 lines, Copyright (c) Microsoft Corporation. MIT
// ------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// ------------------------------------------------------------------------------------------------
namespace System.AI;
using System.Environment;
codeunit 7760 "Copilot Capability Install"
{
Subtype = Install;
InherentEntitlements = X;
InherentPermissions = X;
trigger OnInstallAppPerDatabase()
begin
RegisterCapabilities();
end;
var
ChatLearnMoreLbl: Label 'https://go.microsoft.com/fwlink/?linkid=2255821', Locked = true;
AnalyzeListLearnMoreLbl: Label 'https://go.microsoft.com/fwlink/?linkid=2252783', Locked = true;
internal procedure RegisterCapabilities()
begin
RegisterSaaSCapability(Enum::"Copilot Capability"::Chat, Enum::"Copilot Availability"::Preview, ChatLearnMoreLbl);
RegisterSaaSCapability(Enum::"Copilot Capability"::"Analyze List", Enum::"Copilot Availability"::Preview, AnalyzeListLearnMoreLbl);
end;
local procedure RegisterSaaSCapability(Capability: Enum "Copilot Capability"; Availability: Enum "Copilot Availability"; LearnMoreUrl: Text[2048])
var
CopilotCapability: Codeunit "Copilot Capability";
EnvironmentInformation: Codeunit "Environment Information";
begin
if EnvironmentInformation.IsSaaSInfrastructure() then
if not CopilotCapability.IsCapabilityRegistered(Capability) then
CopilotCapability.RegisterCapability(Capability, Availability, LearnMoreUrl);
end;
[EventSubscriber(ObjectType::Page, Page::"Copilot AI Capabilities", 'OnRegisterCopilotCapability', '', false, false)]
local procedure OnRegisterCopilotCapability()
begin
RegisterCapabilities();
end;
}Procedures, 1
| Name | Parameters | Returns | Access | Obsolete |
|---|---|---|---|---|
| RegisterCapabilities | () | internal | - |