-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPage800002RFQ.al
198 lines (181 loc) · 6.77 KB
/
Page800002RFQ.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
page 50102 RFQ
{
PageType = Card;
ApplicationArea = All;
UsageCategory = Administration;
SourceTable = RFQ;
layout
{
area(Content)
{
group(GroupName)
{
field("Get Requisition Lines"; Rec."Get Requisition Lines")
{
ApplicationArea = Basic;
ToolTip = 'Specifies the value of the Get Requisition Lines field.';
}
field("RFQ DATE"; Rec."RFQ DATE")
{
ApplicationArea = Basic;
ToolTip = 'Specifies the value of the RFQ DATE field.';
}
field("RFQ NO"; Rec."RFQ NO")
{
ApplicationArea = Basic;
ToolTip = 'Specifies the value of the RFQ NO field.';
}
field(STATUS; Rec.STATUS)
{
ApplicationArea = Basic;
ToolTip = 'Specifies the value of the RFQ STATUS field.';
}
}
group(Control13)
{
ShowCaption = false;
part(Control12; RFQLIST)
{
ApplicationArea = Basic, Suite;
SubPageLink = "RFQ NO" = FIELD("RFQ NO");
}
}
}
}
actions
{
area(processing)
{
group("Request Approval")
{
Caption = 'Request Approval';
Image = SendApprovalRequest;
action(SendApprovalRequest)
{
ApplicationArea = Basic, Suite;
Caption = 'Send A&pproval Request';
Enabled = NOT OpenApprovalEntriesExist;
Image = SendApprovalRequest;
ToolTip = 'Request approval to change the record.';
Promoted = true;
PromotedCategory = Process;
trigger OnAction()
var
CustomWorkflowMgmt: Codeunit "Custom Workflow Mgmt";
RecRef: RecordRef;
begin
RecRef.GetTable(Rec);
if CustomWorkflowMgmt.CheckApprovalsWorkflowEnabled(RecRef) then
CustomWorkflowMgmt.OnSendWorkflowForApproval(RecRef);
end;
}
action(CancelApprovalRequest)
{
ApplicationArea = Basic, Suite;
Caption = 'Cancel Approval Re&quest';
Enabled = CanCancelApprovalForRecord;
Image = CancelApprovalRequest;
ToolTip = 'Cancel the approval request.';
Promoted = true;
PromotedCategory = Process;
trigger OnAction()
var
CustomWorkflowMgmt: Codeunit "Custom Workflow Mgmt";
RecRef: RecordRef;
begin
RecRef.GetTable(Rec);
CustomWorkflowMgmt.OnCancelWorkflowForApproval(RecRef);
end;
}
}
}
area(Creation)
{
group(Approval)
{
Caption = 'Approval';
action(Approve)
{
ApplicationArea = All;
Caption = 'Approve';
Image = Approve;
ToolTip = 'Approve the requested changes.';
Promoted = true;
PromotedCategory = New;
Visible = OpenApprovalEntriesExistCurrUser;
trigger OnAction()
begin
ApprovalsMgmt.ApproveRecordApprovalRequest(Rec.RecordId);
end;
}
action(Reject)
{
ApplicationArea = All;
Caption = 'Reject';
Image = Reject;
ToolTip = 'Reject the approval request.';
Visible = OpenApprovalEntriesExistCurrUser;
Promoted = true;
PromotedCategory = New;
trigger OnAction()
begin
ApprovalsMgmt.RejectRecordApprovalRequest(Rec.RecordId);
end;
}
action(Delegate)
{
ApplicationArea = All;
Caption = 'Delegate';
Image = Delegate;
ToolTip = 'Delegate the approval to a substitute approver.';
Visible = OpenApprovalEntriesExistCurrUser;
Promoted = true;
PromotedCategory = New;
trigger OnAction()
begin
ApprovalsMgmt.DelegateRecordApprovalRequest(Rec.RecordId);
end;
}
action(Comment)
{
ApplicationArea = All;
Caption = 'Comments';
Image = ViewComments;
ToolTip = 'View or add comments for the record.';
Visible = OpenApprovalEntriesExistCurrUser;
Promoted = true;
PromotedCategory = New;
trigger OnAction()
begin
ApprovalsMgmt.GetApprovalComment(Rec);
end;
}
action(Approvals)
{
ApplicationArea = All;
Caption = 'Approvals';
Image = Approvals;
ToolTip = 'View approval requests.';
Promoted = true;
PromotedCategory = New;
Visible = HasApprovalEntries;
trigger OnAction()
begin
ApprovalsMgmt.OpenApprovalEntriesPage(Rec.RecordId);
end;
}
}
}
}
trigger OnAfterGetCurrRecord()
begin
OpenApprovalEntriesExistCurrUser := ApprovalsMgmt.HasOpenApprovalEntriesForCurrentUser(Rec.RecordId);
OpenApprovalEntriesExist := ApprovalsMgmt.HasOpenApprovalEntries(Rec.RecordId);
CanCancelApprovalForRecord := ApprovalsMgmt.CanCancelApprovalForRecord(Rec.RecordId);
HasApprovalEntries := ApprovalsMgmt.HasApprovalEntries(Rec.RecordId);
end;
var
OpenApprovalEntriesExistCurrUser, OpenApprovalEntriesExist, CanCancelApprovalForRecord
, HasApprovalEntries : Boolean;
ApprovalsMgmt: Codeunit "Approvals Mgmt.";
}