Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,17 @@ page 7128 "Mileage Rate Setup"
}
}
}

trigger OnQueryClosePage(CloseAction: Action): Boolean

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$\textbf{🟡\ Medium\ Severity\ —\ Agent}$

The new OnQueryClosePage trigger on page 7128 "Mileage Rate Setup" prompts "No mileage rates have been configured. The standard mileage rate will be used. Do you want to continue?" every time the page is closed with an empty table. This page has UsageCategory = Lists, so it is reachable directly from the Lists menu/search, not only from the Expense Agent Setup Wizard drill-down added in this PR. A user who opens the list independently (e.g., just to check whether rates exist) and closes it without adding a rate will see a setup-wizard-flavored confirmation that is confusing outside the wizard flow, and answering No leaves the page open with no clear indication of what action is expected. Consider moving this confirmation into the wizard's own close/validation flow, or scoping it so it only prompts when the page was opened modally from the wizard.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why · AL review agent v1.36.6

var
MileageRateSetup: Record "Mileage Rate Setup";
begin
if not MileageRateSetup.IsEmpty() then
exit(true);

exit(Confirm(MissingMileageRateSetupQst, true));
end;

var
MissingMileageRateSetupQst: Label 'No mileage rates have been configured. The standard mileage rate will be used. Do you want to continue?';
}
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,19 @@ page 6991 "Expense Agent Setup Wizard"
ConfigUpdated();
end;
}
field(MileageRateSetupLink; MileageRateSetupLinkTxt)
{
ShowCaption = false;
Editable = false;
ToolTip = 'Specifies where to configure mileage rates by vehicle type.';

trigger OnDrillDown()
var
MileageRateSetup: Page "Mileage Rate Setup";
begin
MileageRateSetup.RunModal();
end;
}
}
group(ProjectGroup)
{
Expand Down Expand Up @@ -944,6 +957,7 @@ page 6991 "Expense Agent Setup Wizard"
RulesAppliedLinkTxt: Label 'View management rules including new defaults';
NoSeriesLinkTxt: Label 'Preview the default number series that will be added';
NoSeriesAppliedLinkTxt: Label 'View number series including new defaults';
MileageRateSetupLinkTxt: Label 'Configure mileage rates by vehicle type';
ExpenseDashboardLinkTxt: Label 'Go to Expense app (opens in new window)';
ExpenseDashboardUrlOnPremTxt: Label 'http://localhost:5173/', Locked = true;
ExpenseDashboardUrlProdTxt: Label 'https://go.microsoft.com/fwlink/?LinkId=2365219', Locked = true;
Expand Down
Loading