From 163305da7400616adbc6a45770852b620894b122 Mon Sep 17 00:00:00 2001 From: Steffen Balslev Date: Thu, 15 Feb 2024 15:42:10 +0100 Subject: [PATCH] 0 index array should stop at L-1 --- .../AppSource Gallery/src/AppSourceProductManager.Codeunit.al | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System Application/App/AppSource Gallery/src/AppSourceProductManager.Codeunit.al b/src/System Application/App/AppSource Gallery/src/AppSourceProductManager.Codeunit.al index 96d0714b4f..7e225bf4bd 100644 --- a/src/System Application/App/AppSource Gallery/src/AppSourceProductManager.Codeunit.al +++ b/src/System Application/App/AppSource Gallery/src/AppSourceProductManager.Codeunit.al @@ -392,7 +392,7 @@ codeunit 2515 "AppSource Product Manager" implements "AppSource Product Manager ResponseObject := AppSourceProductManagerDependencies.GetAsJSon(RestClient, NextPageLink).AsObject(); if (ResponseObject.Get('items', ProductArrayToken)) then begin ProductArray := ProductArrayToken.AsArray(); - for i := 0 to ProductArray.Count() do + for i := 0 to (ProductArray.Count() - 1) do if (ProductArray.Get(i, ProductToken)) then InsertProductFromObject(ProductToken.AsObject(), AppSourceProductRec); end;