/
SecretValue.Table.al
79 lines (76 loc) · 2.09 KB
/
SecretValue.Table.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
table 70455525 SecretValueAJK
{
Access = Internal;
DataPerCompany = false;
fields
{
field(1; PrimaryKey; Code[10])
{
Caption = 'Primary Key';
DataClassification = SystemMetadata;
}
field(2; SecretValue1; Blob)
{
Caption = 'Secret Value 1';
DataClassification = SystemMetadata;
Compressed = true;
}
field(3; SecretValue2; Blob)
{
Caption = 'Secret Value 2';
DataClassification = SystemMetadata;
Compressed = true;
}
field(4; SecretValue3; Blob)
{
Caption = 'Secret Value 3';
DataClassification = SystemMetadata;
Compressed = true;
}
}
[NonDebuggable]
procedure SetSecretTextValue(Id: Integer; TextValue: Text)
var
OutStr: OutStream;
begin
case Id of
1:
SecretValue1.CreateOutStream(OutStr);
2:
SecretValue2.CreateOutStream(OutStr);
3:
SecretValue3.CreateOutStream(OutStr);
end;
OutStr.WriteText(TextValue);
end;
[NonDebuggable]
procedure GetSecretTextValue(Id: Integer) TextValue: Text
var
InStr: InStream;
begin
case Id of
1:
begin
if not SecretValue1.HasValue() then
exit;
CalcFields(SecretValue1);
SecretValue1.CreateInStream(InStr);
end;
2:
begin
if not SecretValue2.HasValue() then
exit;
CalcFields(SecretValue2);
SecretValue2.CreateInStream(InStr);
end;
3:
begin
if not SecretValue3.HasValue() then
exit;
CalcFields(SecretValue3);
SecretValue3.CreateInStream(InStr);
end;
end;
InStr.ReadText(TextValue);
end;
}