-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCodeunit 50102 InstallCode.al
More file actions
50 lines (38 loc) · 1.07 KB
/
Codeunit 50102 InstallCode.al
File metadata and controls
50 lines (38 loc) · 1.07 KB
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
codeunit 50102 InstallCode
{
Subtype = Install;
trigger OnInstallAppPerCompany();
begin
InsertBook('0001','Bernini Code', 'Ban Drown', 480);
InsertBook('0002','Copy Cat','Catwoman',138);
//UpdateFavoriteBook('10000','0001');
//UpdateFavoriteBook('20000','0003');
end;
trigger OnInstallAppPerDatabase();
begin
end;
local procedure InsertBook(BookNo: Code[10]; BookTitle: Text; BookAuthor: Text; BookPageCount: Integer);
var
Book: Record Book;
begin
with Book do begin
if get(BookNo) then exit;
"No." := BookNo;
Author := BookAuthor;
Hardcover := true;
Title := BookTitle;
"Page Count" := BookPageCount;
Insert;
end;
end;
local procedure UpdateFavoriteBook(CustNo: Code[20];FavBookNo: Code[10]);
var
Cust: Record Customer;
begin
with Cust do begin
get(CustNo);
"Favorite Book" := FavBookNo;
modify;
end;
end;
}