You need to sign in to do that
Don't have an account?
admin twentyone
Issue with Salesforce Ajax Toolkit (connection.js)
I am trying to download Salesforce Chatter files using Ajax Toolkit of salesforce. Once the file (which is in string format) is downloaded, convert it to blob and then upload to ShareFile(File Storage Solution).
I have observed that each Chatter file can have maximum size of 2GB. However, with the Ajax Toolkit route I am facing Out of Memory issue in Internet Explorer for file size greater than 15MB. Same error occurs in Firefox when file size is greater than 30MB. Is there a better way to download Chatter files other than using Ajax Toolkit.
What I am doing is similar to the example here : https://developer.salesforce.com/docs/atlas.en-us.ajax.meta/ajax/sforce_api_ajax_more_samples_asynch.htm
My Code:
Exception/Error Trace:
Error occurs at line 635 in ../../soap/ajax/40.0/connection.js
I have observed that each Chatter file can have maximum size of 2GB. However, with the Ajax Toolkit route I am facing Out of Memory issue in Internet Explorer for file size greater than 15MB. Same error occurs in Firefox when file size is greater than 30MB. Is there a better way to download Chatter files other than using Ajax Toolkit.
What I am doing is similar to the example here : https://developer.salesforce.com/docs/atlas.en-us.ajax.meta/ajax/sforce_api_ajax_more_samples_asynch.htm
My Code:
Var result = sforce.connection.query('select Title,versiondata,versionnumber,FileExtension,ContentSize from contentversion where Id in (\'' + idList + '\') Order By versionnumber DESC',{ onSuccess : success, onFailure : failure });
Exception/Error Trace:
Error occurs at line 635 in ../../soap/ajax/40.0/connection.js
} else if (holder.connection.status == 200 && holder.connection.responseText != null && holder.connection.responseText != "") {
Ajax Toolkit is ancient, blast from the past when we used S-Controls. It might be introducing some extra memory footprint. Is your integration capable of making REST calls? REST API and/or Bulk API could work nicely. But if it's browser's limitation you're hitting you might have to do it another way, with Data Loader maybe or proper server-side tools... There are apps for that ;) Dataloader.io, Informatica Cloud, maybe even some connectors on AppExchange you could use.
Thanks,
Nagendra