-
Notifications
You must be signed in to change notification settings - Fork 1
/
CopilotSetup.Page.al
64 lines (55 loc) · 1.58 KB
/
CopilotSetup.Page.al
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
page 70100 "CoPilot Setup"
{
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = "Marketing Setup";
SourceTableTemporary = true;
layout
{
area(Content)
{
group(GroupName)
{
field(Endpoint; Endpoint)
{
ApplicationArea = All;
trigger OnValidate()
begin
IsolatedStorage.Set('Copilot-Endpoint', Endpoint);
end;
}
field(Deployment; Deployment)
{
ApplicationArea = All;
trigger OnValidate()
begin
IsolatedStorage.Set('Copilot-Deployment', Deployment);
end;
}
field(ApiKey; ApiKey)
{
ApplicationArea = All;
ExtendedDatatype = Masked;
trigger OnValidate()
begin
IsolatedStorage.Set('Copilot-ApiKey', ApiKey);
end;
}
}
}
}
var
[NonDebuggable]
Endpoint: Text;
[NonDebuggable]
Deployment: Text;
[NonDebuggable]
ApiKey: Text;
trigger OnInit()
begin
if IsolatedStorage.Get('Copilot-Endpoint', Endpoint) then;
if IsolatedStorage.Get('Copilot-Deployment', Deployment) then;
if IsolatedStorage.Get('Copilot-ApiKey', ApiKey) then;
end;
}