[Shopify] Add Company drilldown on B2B Catalogs page (30159)#8439
Open
onbuyuka wants to merge 2 commits into
Open
[Shopify] Add Company drilldown on B2B Catalogs page (30159)#8439onbuyuka wants to merge 2 commits into
onbuyuka wants to merge 2 commits into
Conversation
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>
| var | ||
| Company: Record "Shpfy Company"; | ||
| begin | ||
| if Company.GetBySystemId(Rec."Company SystemId") then |
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 alookupkeyed on the Guid"Company SystemId". The field declared no explicitOnDrillDown, so the platform's implicit drilldown intoShpfy Company(via itsDrillDownPageId) throws an unhandled exception that surfaces as the generic application-error page. The connector already uses the explicit-OnDrillDownworkaround for the Customer No. column inShpfyCompanies.Page.alfor the same reason.Fix
Add an explicit
OnDrillDownon the Company field of page 30159 that opens the Shpfy Company Card (page 30157) viaGetBySystemId, mirroring the existingShpfyCompanies.Page.alidiom (GetBySystemId→SetRecFilter→SetTableView→Run).Impact / risk
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 samelookup ... where SystemId = field("... SystemId")FlowField pattern is advisable.Linked work item: AB#637615 (ICM 51000001047725)
🤖 Generated with Claude Code