Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection size 1,381 exceeds maximum size of 1,000. #50

Open
kkorynta opened this issue Dec 14, 2018 · 3 comments
Open

Collection size 1,381 exceeds maximum size of 1,000. #50

kkorynta opened this issue Dec 14, 2018 · 3 comments

Comments

@kkorynta
Copy link

I'm trying to upload a sample/test file that contains only two records and I'm receiving the error:
Collection size 1,381 exceeds maximum size of 1,000.

The 1,381 number matches how many metadata records are on this particular __mdt in our org.

@Windyo
Copy link

Windyo commented May 11, 2020

Same issue here. Not really sure where the col size comes from.
Deosn't match sourc eamuotn of records (990) or the amount of records in the org (2.3k).

Collection size 1.835 exceeds maximum size of 1.000.

@acorellaefx93
Copy link

@Windyo / @kkorynta

I experienced the same issue with more than 2200k records. After researching on the Apex Classes contained within the package, I got a workaround that will help you to upload more records without having this issue.

If you go the the CustomMetadataUploadController, at the line number 83, you will see this:

selectQuery = selectQuery + ' FROM ' + selectedType

This will query and pull all the records from the Custom Metadata Type that you are trying to insert records to. I added LIMIT 1000 to the query; blocking the visualforge page to pull more than 1000 records per load.

This workaround will help you to upload records, but It will not be able to match if there are duplicates or not (since it won't be able to check with the entire dataset).

The line should look like this selectQuery = selectQuery + ' FROM ' + selectedType + ' LIMIT 1000';

@AndiMcLaughlin
Copy link

@acorellaefx93 I made this update and am now getting

Maximum view state size limit (170KB) exceeded. Actual view state size for this page was 175.267KB

any ideas on this one? My feeling is that we need an update and a load button in this tool so that you can have a limit query for updates but I am an admin and only a declarative developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants