Skip to content
Snippets Groups Projects
Commit ad104e60 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Merge branch 'sales_2003433_FixClassificationPaging' into '2021.2'

[Projekt: xRM-Sales][TicketNr.: 2003433][Klassifizierung: paging fix]

See merge request xrm/basic!1592
parents 5efca4d5 788d6c7f
No related branches found
No related tags found
No related merge requests found
......@@ -1033,7 +1033,6 @@ ClassificationUpdateHelper._buildFilteredRecsObject = function(pClassificationTy
if (executeGetRows) //only do this once for every object type, since the rows don't change depending on the filter
{
var startRow = 0;
var startRowIncreased; // once we are higher than the pageSize of the core (400!) getRows() doesn't actually start with the specified startrow as offset, but instead 100 rows earlier, so we have to increase the startRow by 100 once we are over 400
var stop = false;
var config = entities.createConfigForLoadingRows()
.entity(ContextUtils.getEntity(currentObjectType))
......@@ -1053,9 +1052,8 @@ ClassificationUpdateHelper._buildFilteredRecsObject = function(pClassificationTy
while(!stop)
{
var rowsOfThisPage = [];
startRowIncreased = startRow >= 400 ? startRow+100 : startRow;
config = config
.startrow(startRowIncreased)
.startrow(startRow)
.count(ClassificationUtils.pagingSizeLoadEntity());
rowsOfThisPage = entities.getRows(config);
......@@ -1421,6 +1419,7 @@ ClassificationUpdateHelper._buildOutdatedStoredClassificationObject = function(p
var storageInsertStatements = [];
for (let i = 0; i < objectTypesClassified.length; i++)
{
pageStart = 0;
var objectidk = objectTypesClassified[i];
var table = objectidk.toUpperCase();
var idColumn = table + "." + table + "ID";
......@@ -1855,7 +1854,6 @@ ClassificationUpdateHelper._updateOutdatedDatasets = function(pClassificationObj
var indicatorObj = ClassificationUpdateHelper._buildindicatorObj(objectTypes[currentObjectType]);
var startRow = 0;
var startRowIncreased; // once we are higher than the pageSize of the core (400!) getRows() doesn't actually start with the specified startrow as offset, but instead 100 rows earlier, so we have to increase the startRow by 100 once we are over 400
var stop = false;
var entityFields = ClassificationUpdateHelper._getEntityFields(objectTypes[currentObjectType]);
......@@ -1880,9 +1878,8 @@ ClassificationUpdateHelper._updateOutdatedDatasets = function(pClassificationObj
}
else
{
startRowIncreased = startRow >= 400 ? startRow+100 : startRow;
objectValuesLoadConfig = objectValuesLoadConfig
.startrow(startRowIncreased)
.startrow(startRow)
.count(ClassificationUtils.pagingSizeLoadEntity());
if (pSingleRefreshRowId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment