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

Installation Error - Implementation restriction: ContentDocumentLink #29

Closed amessineo closed 7 years ago

amessineo commented 7 years ago

Hi, I'm getting the following error when trying to install to a partial sandbox using the SandBox link for latest version. Is there a work around for this? Thanks!

Anne-Marie

Error Number: 90945798-26744 (-1917862329) Problem:

  1. Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator. ConvertAttachmentsToFilesServiceTest: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator.

  2. Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator. ConvertAttachmentsToFilesServiceTest: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator.

  3. Invalid type: ConvertAttachmentsToFilesOptions ConvertAttachmentsToFilesTrigger: Invalid type: ConvertAttachmentsToFilesOptions

  4. Apex class 'dca_cnvrt_file.ConvertAttachmentsRunOnceController' does not exist ConvertAttachmentsFAQPage: Apex class 'dca_cnvrt_file.ConvertAttachmentsRunOnceController' does not exist

  5. Apex class 'dca_cnvrt_file.ConvertAttachmentsRunOnceController' does not exist ConvertAttachmentsRunOncePage: Apex class 'dca_cnvrt_file.ConvertAttachmentsRunOnceController' does not exist

  6. Apex class 'dca_cnvrt_file.ConvertAttachmentsScheduleController' does not exist ConvertAttachmentsSchedulePage: Apex class 'dca_cnvrt_file.ConvertAttachmentsScheduleController' does not exist

  7. Apex class 'dca_cnvrt_file.ConvertAttachmentsSettingsController' does not exist ConvertAttachmentsSettingsPage: Apex class 'dca_cnvrt_file.ConvertAttachmentsSettingsController' does not exist

  8. (Convert_Attachments_to_Files) In field: apexClass - no ApexClass named ConvertAttachmentsToFilesServiceTest found Convert_Attachments_to_Files: In field: apexClass - no ApexClass named ConvertAttachmentsToFilesServiceTest found

Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator. ConvertAttachmentsToFilesServiceTest: Implementation restriction: ContentDocumentLink requires a filter by a single Id on ContentDocumentId or LinkedEntityId using the equals operator or multiple Id's using the IN operator.
Invalid type: ConvertAttachmentsToFilesOptions ConvertAttachmentsToFilesTrigger: Invalid type: ConvertAttachmentsToFilesOptions
douglascayers commented 7 years ago

Hi Anne-Marie,

Sorry you're having installation issue. Did your errors ever give you a line number by chance where it failed in ConvertAttachmentsToFilesServiceTest?

What edition is your org? Enterprise?

I know you said you tried the sandbox installation link, but for my own benefit so I make sure to test with same link you used could you paste it here as comment please? I've only tested installing into dev orgs, don't readily have sandboxes to test with but I'd hope no difference.

Thanks,

Doug

amessineo commented 7 years ago

Hi Doug,

No line number was given. We are using Unlimited Edition and I'm installing into a Partial Sandbox. Using the following link https://test.salesforce.com/packaging/installPackage.apexp?p0=04t46000001VnYW

I found a few links when I googled the implementation error. I was able to install it in another Dev sandbox without problems, so I'm not sure what might be causing the problem.

Thanks for your help! -Anne-Marie

amessineo commented 7 years ago

Hi Doug, I went ahead and installed in our Full sandbox, and it went in without a problem. So it might have just been something strange with that particular sandbox.

I do have another question - to convert batches of existing attachments, am I just adding them to the test conversion tool? Or am I missing something? Is there a limit to the number of records we can add to the test conversion id field? We do want to potentially prioritize and limit what we are converting over.

Thanks! Anne-Marie

douglascayers commented 7 years ago

So strange, but glad you got it working in another sandbox.

Yes, use the "Test Conversion", or I may have recently relabeled it to "Convert Attachments", menu to initiate your conversion of existing Attachments to Files. You can limit to specific parent records by specifying one or more comma-delimited record ids in the text area box on that page. If you leave it blank then all Attachments will be attempted to be converted. The max number of IDs you can specify is... I'm not sure... I've never tried to max it out honestly.

It's on my todo list to provide "by object" conversions too, but no ETA on that.

guenthmn commented 6 years ago

I think this happens when you query for exiting files and the : set is empty:

// before creating the content document links // some files may already be linked to some records // so we need to look for any existing shares so // we don't try to insert duplicate shares and get error

I wrapped the query in an if statement to ensure that there is at least one value in the set