Skip to content

[Shopify] Add Company drilldown on B2B Catalogs page (30159)#8439

Open
onbuyuka wants to merge 2 commits into
mainfrom
bugs/637615-shopify-catalog-company-drilldown
Open

[Shopify] Add Company drilldown on B2B Catalogs page (30159)#8439
onbuyuka wants to merge 2 commits into
mainfrom
bugs/637615-shopify-catalog-company-drilldown

Conversation

@onbuyuka
Copy link
Copy Markdown
Contributor

@onbuyuka onbuyuka commented Jun 3, 2026

Summary

On the Shopify B2B Catalogs page (page 30159 "Shpfy Catalogs"), clicking the Company column returned the generic "Something went wrong. An error has occurred" page instead of opening the related Shopify Company. Reproduces deterministically across environments; no customer extension involved.

Root cause

The Company column is bound to the Shpfy Catalog."Company Name" FlowField, which is a lookup keyed on the Guid "Company SystemId". The field declared no explicit OnDrillDown, so the platform's implicit drilldown into Shpfy Company (via its DrillDownPageId) throws an unhandled exception that surfaces as the generic application-error page. The connector already uses the explicit-OnDrillDown workaround for the Customer No. column in ShpfyCompanies.Page.al for the same reason.

Fix

Add an explicit OnDrillDown on the Company field of page 30159 that opens the Shpfy Company Card (page 30157) via GetBySystemId, mirroring the existing ShpfyCompanies.Page.al idiom (GetBySystemIdSetRecFilterSetTableViewRun).

Impact / risk

  • Purely additive, low risk. The previous behavior was a hard error; the new behavior opens the company card, or is a no-op when the catalog has no linked company.
  • Cosmetic/navigation fix — no data, sync, or functional impact.

Backport candidates

Land in main; backport candidates 28.x, 28.2.x, 28.1.x (code is identical across these). A follow-up sweep for other Shpfy pages using the same lookup ... where SystemId = field("... SystemId") FlowField pattern is advisable.

Linked work item: AB#637615 (ICM 51000001047725)

🤖 Generated with Claude Code

Clicking the Company column on page 30159 "Shpfy Catalogs" returned the
generic "Something went wrong" error page instead of opening the related
Shopify Company. The column is bound to the "Company Name" lookup FlowField
(keyed on the Guid "Company SystemId"); without an explicit OnDrillDown the
platform's implicit drilldown into "Shpfy Company" throws an unhandled
exception that surfaces as the generic application-error page.

Add an explicit OnDrillDown that opens the "Shpfy Company Card" via
GetBySystemId, mirroring the existing Customer No. drilldown in
ShpfyCompanies.Page.al.

Fixes AB#637615

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jun 3, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jun 3, 2026
@onbuyuka onbuyuka marked this pull request as ready for review June 4, 2026 08:03
@onbuyuka onbuyuka requested a review from a team as a code owner June 4, 2026 08:03
@onbuyuka onbuyuka enabled auto-merge (squash) June 4, 2026 08:03
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant