Hi Everyone,
My issue is regarding the RunModal method which I am using on a customized page.
I have written the following code on OnAction trigger of a button. Expectation is that, upon clicking 'YES' on the confirmation dialog box a page with some filters should get opened.
But in my case, when I hit the button for the first time, incorrect page is getting opened (the page on which I am currently) then I close the page and reopen it, this time correct page is there.
I am not able to figure out the reason behind this. Kindly provide me a quick solution to this !
Many Thanks...
code snippet-
if IsInProgress then begin
if Confirm('Another task is in progress Timesheet no. %1, date %2, Line no. %3', true, TimeSheetNo, periodStart, LineNo) then begin
T_Tracker_Rec.Reset();
Clear(T_Tracker_Rec);
T_Tracker_Rec.SetRange("Job No.", "Job No.");
T_Tracker_Rec.SetRange("Time Sheet No.", TimeSheetNo);
T_Tracker_Rec.SetRange("Line No.", LineNo);
T_Tracker_Rec.SetRange(TimeSheetDate, periodStart);
T_Tracker_Rec.SetRange(FieldID, ColumnID);
if T_Tracker_Rec.FindFirst() then begin
TimeTrackerPage.SetTableView(T_Tracker_Rec);
TimeTrackerPage.SetRecord(T_Tracker_Rec);
if TimeTrackerPage.RunModal() = Action::LookupOK then begin
TimeTrackerPage.GetRecord(T_Tracker_Rec);
end;
end;