RecordCap

Shuaib Nazir
Shuaib Nazir Member Posts: 3

Hi, I am creating an IDO Custom Assembly and in C#, calling loadCollection, where I am expecting 50,000 records:

            LoadCollectionResponseData loadResponse = new LoadCollectionResponseData();
LoadCollectionRequestData loadRequest = new LoadCollectionRequestData(); //Some Code here loadRequest.RecordCap = 0;
loadResponse.RecordCap = 0;
loadResponse = this.Context.Commands.LoadCollection(loadRequest);

I am getting max 5000 rows. I want to get more than 5000. RecordCap is NOT working as expected. Any tips on how I can load more rows?

Best Answers

  • Carsten Steinhoefel
    Carsten Steinhoefel Member, Staff Posts: 18
    Answer ✓

    Please read the following chapter in the documentation: Infor Documentation Library

    Basically, there are 3 record caps coming into play: The farm-level record cap which I believe is 20,000 in MT cloud (would need to confirm), the Max User record cap setting on the Process Defaults form and the record cap the users are setting or you are setting programmatically. Details about the interaction are described in above doc.

  • Carsten Steinhoefel
    Carsten Steinhoefel Member, Staff Posts: 18
    Answer ✓

    If you want to read the data in chunks, you can use bookmarking like below:

    			var request = new LoadCollectionRequestData("IDO Name", "Properties", "", "", 100);
    			request.EnableBookmark = true;
    
    			var response = Context.Commands.LoadCollection(request);
    			var bookmark = response.Bookmark;
    			var hasMoreRows = response.MoreItems;
                            // Process first bunch now  
    
    			while (hasMoreRows)
    			{
    				request.Bookmark = bookmark;
    				request.LoadType = LoadCollectionType.Next; 
    				response = Context.Commands.LoadCollection(request);
    				bookmark = response.Bookmark;
    				hasMoreRows = response.MoreItems;
    				// Process next batch here
    
    			}
    		}
    

    There is also an example in the documentation using the Mongoose REST API:

    https://docs.infor.com/mg/2024.x/en-us/mongooseolh/default.html?helpcontent=mgiiea/ooc1576799884898.html&hl=bookmark

Answers