Hi,
I have a case where I am testing a custom made report.
The report does nothing else but it copies some lines from one campaign to another. When I run action to run this report to copy lines it opens a request window where is possible to filter campaigns to copy lines from.
My question is how to manipulate TestRequestPage when running the test? For example, I would like to insert some value on the request page and regarding this value, the method will process on.
Here is a photo of my request window which runs before report: https://ibb.co/H4f32rC
Here as seen on the photo I would like to "insert" value for "Sales Code", but all in AL code.
I am using handler method to handle this event but I can't find any useful function for setting values in the request window.
[RequestPageHandler]
procedure B2C24_Req_Handler(var pRequestPage: TestRequestPage CopyPricesDiscFromCampaign)
begin
// what to do here with pRequestPage variable? How to set value for filter?
pRequestPage.OK().Invoke(); // submit filter
end;
I've checked all functions that are available for TestRequestPage variable type and nothing. Did anyone else try to run tests for reports with request windows and how did you do it?
I am working with Business Central Spring 2019 edition: Platform 14.0.35916.0 + Application 29537 (W1 14.0), AL compiler: v. 3.0.154634.