Skip to content
Open
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 @@ -31,6 +31,15 @@ page 30159 "Shpfy Catalogs"
{
Caption = 'Company';
Editable = false;
DrillDown = true;

trigger OnDrillDown()
var
Company: Record "Shpfy Company";
begin
if Company.GetBySystemId(Rec."Company SystemId") then
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\ —\ Style} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

Silent no-op when Company record missing

When Rec."Company SystemId" is an empty or unresolved GUID (e.g. the catalog is not linked to a company), GetBySystemId returns false and the drill-down silently does nothing, giving the user no feedback that the action was a no-op.

Recommendation:

  • Add an else branch that either shows a message or disables the drill-down when no Company is found, so the user understands why clicking the field had no effect.
Suggested change
if Company.GetBySystemId(Rec."Company SystemId") then
trigger OnDrillDown()
var
Company: Record "Shpfy Company";
begin
if Company.GetBySystemId(Rec."Company SystemId") then
Page.Run(Page::"Shpfy Company Card", Company)
else
Message('No company is linked to this catalog.');
end;

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

Page.Run(Page::"Shpfy Company Card", Company);
end;
}
field(SyncPrices; Rec."Sync Prices") { }
field("Currency Code"; Rec."Currency Code")
Expand Down
Loading