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