From c951d808bc7187c390945f88dfa2b3dbe62a859e Mon Sep 17 00:00:00 2001 From: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com> Date: Mon, 10 Aug 2026 11:13:35 +0200 Subject: [PATCH] [Shopify] Add cues for Skipped Records and API Errors on Activities page Skipped records from background (Job Queue) syncs and logged API errors were invisible unless users manually opened the logs. Add two cues to the Shpfy Cue table (30100) and Shpfy Activities page (30100): - Skipped Records: count of Shpfy Skipped Record, styled amber when > 0, drills down to the Shpfy Skipped Records page. - API Errors: count of Shpfy Log Entry with Has Error = true, styled red when > 0, drills down to the Shpfy Log Entries page filtered to errors. Both cues are unfiltered by date; the Retention Policy framework (1-month period on SystemCreatedAt) handles cleanup. Fixes AB#646260 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 26d86952-9110-4708-a976-98be9eb2bfe7 --- .../src/Base/Pages/ShpfyActivities.Page.al | 38 +++++++++++++++++++ .../App/src/Base/Tables/ShpfyCue.Table.al | 12 ++++++ 2 files changed, 50 insertions(+) diff --git a/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyActivities.Page.al b/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyActivities.Page.al index f574005cb8b..6f5266f9590 100644 --- a/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyActivities.Page.al +++ b/src/Apps/W1/Shopify/App/src/Base/Pages/ShpfyActivities.Page.al @@ -111,6 +111,27 @@ page 30100 "Shpfy Activities" ToolTip = 'Specifies the number of order updates that aren''t processed.'; DrillDownPageId = "Shpfy Orders"; } + field(SkippedRecords; Rec."Skipped Records") + { + ApplicationArea = All; + DrillDownPageId = "Shpfy Skipped Records"; + StyleExpr = SkippedRecordsStyleTxt; + ToolTip = 'Specifies the number of records that were skipped during synchronization.'; + } + field(APIErrors; Rec."API Errors") + { + ApplicationArea = All; + StyleExpr = APIErrorsStyleTxt; + ToolTip = 'Specifies the number of log entries that ended with an API error.'; + + trigger OnDrillDown() + var + LogEntry: Record "Shpfy Log Entry"; + begin + LogEntry.SetRange("Has Error", true); + Page.Run(Page::"Shpfy Log Entries", LogEntry); + end; + } } } } @@ -138,6 +159,20 @@ page 30100 "Shpfy Activities" } } + trigger OnAfterGetRecord() + begin + Rec.CalcFields("Skipped Records", "API Errors"); + if Rec."Skipped Records" > 0 then + SkippedRecordsStyleTxt := 'Ambiguous' + else + SkippedRecordsStyleTxt := 'Favorable'; + + if Rec."API Errors" > 0 then + APIErrorsStyleTxt := 'Unfavorable' + else + APIErrorsStyleTxt := 'Favorable'; + end; + trigger OnOpenPage() var Shop: Record "Shpfy Shop"; @@ -161,4 +196,7 @@ page 30100 "Shpfy Activities" end; end; + var + SkippedRecordsStyleTxt: Text; + APIErrorsStyleTxt: Text; } \ No newline at end of file diff --git a/src/Apps/W1/Shopify/App/src/Base/Tables/ShpfyCue.Table.al b/src/Apps/W1/Shopify/App/src/Base/Tables/ShpfyCue.Table.al index a202aadf334..f35287e6d32 100644 --- a/src/Apps/W1/Shopify/App/src/Base/Tables/ShpfyCue.Table.al +++ b/src/Apps/W1/Shopify/App/src/Base/Tables/ShpfyCue.Table.al @@ -85,6 +85,18 @@ table 30100 "Shpfy Cue" Caption = 'Unmapped Companies'; FieldClass = FlowField; } + field(10; "Skipped Records"; Integer) + { + CalcFormula = count("Shpfy Skipped Record"); + Caption = 'Skipped Records'; + FieldClass = FlowField; + } + field(11; "API Errors"; Integer) + { + CalcFormula = count("Shpfy Log Entry" where("Has Error" = const(true))); + Caption = 'API Errors'; + FieldClass = FlowField; + } } keys