TestPermissions = Disabled;
EventSubscriberInstance = Manual;
InherentPermissions = X;
[HandlerFunctions('CalculatePlanReportRequestPageHandler30D')]
[CommitBehavior(CommitBehavior::Ignore)]
[TransactionModel(TransactionModel::AutoCommit)]
procedure CreateRequestionNone()
var
ReqLine: Record /Requisition Line/;
ReqWorksheet: TestPage /Req. Worksheet/;
CalculatePlan: Report /Calculate Plan - Req. Wksh./;
/Req. Wksh. Template/: record /Req. Wksh. Template/;
/Requisition Wksh. Name/: Record /Requisition Wksh. Name/;
Fail: Boolean;
Succes: Boolean;
XmlParameters: Text;
begin
//[Given] An item for a customer a vendor and a Salesorder
PrepareSetupEnabled();
PrepareData();
//ReqWorksheet.OpenView();
// Commit();
/Requisition Wksh. Name/.setrange(/Worksheet Template Name/, /Req. Wksh. Template/.Name);
if /Requisition Wksh. Name/.FindFirst() then;
end;
CalculatePlan.SetTemplAndWorksheet(/Req. Wksh. Template/.Name, /Requisition Wksh. Name/.Name);
XmlParameters := Report.RunRequestPage(Report::/Calculate Plan - Req. Wksh./);
LibraryReportDataset.RunReportAndLoad(Report::/Calculate Plan - Req. Wksh./, ReqLine, XmlParameters);
Clear(CalculatePlan);
// ReqWorksheet.CalculatePlan.Invoke();
ReqLine.SetRange(/No./, '150.160.170');
ReqLine.FindFirst();
ReqWorksheet.GoToRecord(ReqLine);
CarryOutActionMessage(ReqWorksheet);
ReqLine.SetRange(/No./, '150.160.170');
if ReqLine.FindSet() then
repeat
if not (ReqLine./Planning Flexibility/ = ReqLine./Planning Flexibility/::None) then
Fail := true;
until ReqLine.Next() = 0;
Succes := true;
Assert.IsTrue(Succes, 'The Requisition should have been succesfull');
end;
[TransactionModel(TransactionModel::AutoCommit)]
procedure CalculatePlanReportRequestPageHandler30D(var CalculatePlan: TestRequestPage /Calculate Plan - Req. Wksh./);
begin
CalculatePlan.StartingDate.SetValue(workdate());
CalculatePlan.EndingDate.SetValue(CalcDate('+30D', WorkDate()));
CalculatePlan.OK().Invoke();
end;