douglascayers / sfdc-convert-attachments-to-chatter-files

📎 Easily migrate your Attachments to Salesforce Files.
https://douglascayers.com/2015/10/10/salesforce-convert-attachments-to-chatter-files/
BSD 3-Clause "New" or "Revised" License
73 stars 29 forks source link

Apex heap size too large #48

Open firstmallorca opened 6 years ago

firstmallorca commented 6 years ago

Hi Douglas

We are always getting this error and don't know how to overcome that. Could you please help.

Apex script unhandled exception by user/organization: 005b000000159po/00D5E0000008nQ1 Source organization: 00Db0000000dJIq (null) Failed to process batch for class 'dca_cnvrt_file.ConvertAttachmentsToFilesBatchable' for job id '7075E00000JRbNZ'

caused by: System.LimitException: Apex heap size too large: 166876089

External entry point (dca_cnvrt_file)

KathyPilgram commented 6 years ago

I need help with this as well. Doug, can we do a screen share?

douglascayers commented 6 years ago

Hello @firstmallorca @KathyPilgram,

Sorry for the late reply. I started a new job in January and just now coming up for air!

Do your all's orgs by chance have other triggers on any of these objects: Attachment, ContentVersion, ContentDocument, ContentDocumentLink, ContentNote?

Try reducing the batch size and see if that eliminates the problem.

Thanks

KathyPilgram commented 6 years ago

Not that we know of, but there must be something because I worked with Salesforce using the magic mover.  They made several changes for me and we were able to get most of the files transferred, but now I need to get the related attachments to show up on the accounts like they did in classic.  I have tried a batch size of 1.  I'm at a loss of what else to try.  My users are going to want to see all attachments related to the account, not just the ones attached to the account. Any way, I can have a zoom meeting with you to take a look? Thanks for the reply, Kathy Pilgram

On Thursday, February 8, 2018 11:24 PM, Doug Ayers <notifications@github.com> wrote:

Hello @firstmallorca @KathyPilgram,Sorry for the late reply. I started a new job in January and just now coming up for air!Do your all's orgs by chance have other triggers on any of these objects: Attachment, ContentVersion, ContentDocument, ContentDocumentLink, ContentNote?Try reducing the batch size and see if that eliminates the problem.Thanks— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.