Page size and page start index

Can some sone please expalin how page size and page start index work in the API. My understanding is:

If I have 12000 record in the item doctype and i need to pull the 12000 record. When i run my integration by default it will return 20 record. the next time the intigration run i set the page start index to 40 meaning it should return only 20 more record not 40 or if it return 40 the 40 is inclusive of the first 20? The issess is the api have page limite of 5000 so if i have 12000 record i can only get 5000 if i set the page index to 5000. to get the other record i have to create a file on the item doctype with some kind of status check that i update every time i pull the record. On the next integration check i will only check for record with status =ā€˜Uā€™ that way i can get more more that 5000 record via the API becuase the first 5000 would have already being process.

Is is there a way to overide the record limit in the API?

In my project am writing to android/windows device with offline storage using sqlite database and am testing with large data sets. there is no issess if the data set is less than 5000 as i mention.

listDIOption.PageSize = 50;
listDIOption.PageStartIndex = 100;

Any feedback?

Hello Everyone,
I figure it out. There is no limit on the API, however you must set the page size to the number of records you are requesting.

var ERPItemClient = new ERPNextClient(clientisAccess.ClienERPServer1, clientisAccess.ClineERPServerUser, clientisAccess.ClientERPServerPassword);

            FetchListOption listOption = new FetchListOption();
            listOption.Filters.Add(new ERPFilter(DocType.Item, "export_all_item", OperatorFilter.NotEquals, "E"));
            listOption.Filters.Add(new ERPFilter(DocType.Item, "modified", OperatorFilter.GreaterThanOrEqual, string.Format("{0:yyyy-MM-dd HH:mm:ss.ffffff}", Yesterday)));
            listOption.IncludedFields.AddRange(new string[] { "item_name ", "income_account ", "name", "item_group", "default_warehouse",
                "is_stock_item", "item_code", "stock_uom", "sales_uom","used_button_image","image_file","brand","valuation_rate",
                "end_of_life", "description", "package_code", "apply_tax", "has_expiry_date",
                "opening_stock", "standard_rate", "disabled","barcode" });

            listOption.PageSize = 12000;
2 Likes