Skip to content

Commit

Permalink
Add geo restrictions to the capabilities (#631)
Browse files Browse the repository at this point in the history
#### Summary
These capabilities are only available in some geos, avoid inserting them
in unsupported geos to avoid confusion.

#### Work Item(s) 
Fixes
[AB#502197](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/502197)
  • Loading branch information
msft-sam committed Feb 26, 2024
1 parent 7cafced commit 252fe25
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@ codeunit 7760 "Copilot Capability Install"
AnalyzeListLearnMoreLbl: Label 'https://go.microsoft.com/fwlink/?linkid=2252783', Locked = true;

internal procedure RegisterCapabilities()
var
EnvironmentInformation: Codeunit "Environment Information";
ApplicationFamily: Text;
begin
RegisterSaaSCapability(Enum::"Copilot Capability"::Chat, Enum::"Copilot Availability"::Preview, ChatLearnMoreLbl);
RegisterSaaSCapability(Enum::"Copilot Capability"::"Analyze List", Enum::"Copilot Availability"::Preview, AnalyzeListLearnMoreLbl);
ApplicationFamily := EnvironmentInformation.GetApplicationFamily();

if ApplicationFamily = 'US' then
RegisterSaaSCapability(Enum::"Copilot Capability"::Chat, Enum::"Copilot Availability"::Preview, ChatLearnMoreLbl);

if ApplicationFamily <> 'CA' then
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])
Expand Down

0 comments on commit 252fe25

Please sign in to comment.