-
Notifications
You must be signed in to change notification settings - Fork 18
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
Transfer Salesforce(Chatter) Files to Google Drive #4
Comments
Yes, it is possible to use these libraries to move files from Salesforce to Google Drive. Indeed, your use case is the one that prompted us to write this library. A sample app demonstrating moving files from Salesforce to Google Drive can be found here. Although this doesn't use a trigger, it would be possible to adapt it in this way. |
HI Matt, Thanks for the response. I installed that Sample App and set everything up, but when I click on the Move Attachments to Google Drive button, the visualforce page that displays shows no files in either the Account Attachments or the Account Google Drive Files. The Test Harness says that everything has been successfully authenticated, and when I try a File Insert in the test harness it all goes through fine. Initially I thought it was because this was searching for the old "Attachments" and not the new Salesforce Files, but am I missing some permission or setting that is stopping the button from working? The other thing I wanted to ask is that I have to reauthenticate by going into the Connector object and clicking activate. Is this just because I'm doing this in a Sandbox environment or do I need to adjust some of the coding so that it will automatically reauthenticate when it needs to? |
Just to follow up: I believe the issue lies in the "Files"/"Attachments" definition as when I uploading a picture from a visualforce page that uploads as an attachment and not a salesforce file, the button did allow me to transfer the image over, saving it as a note with a URL link to the file hosted on Google Drive. I guess the next question is if there is any way to parse this through files connect, and rather than having a note with a URL, have the file connected to the object record via ContentDocumentLink? |
Regarding the reauthentication question, the method Looking at the sample app, the As you have seen, the 'Transfer to Google Drive' button transfers the file from Salesforce and creates a note with the URL. It may be that the ContentDocumentLink is more appropriate in which case the |
I see, thanks for the response. I apologize if many of these seem simple questions. This is my first real forray into the Dev side of Salesforce so I will probably have to go back and do some more thorough reading to understand how to apply the method you mention to my application. Similarly with using ContentDocumentLink, what would be the method that you would recommend to enable me to identify which file in Google Drive to update. I'm guessing to queryAll() of the ContentDocuments by Title (unless there is a way to query it by the external object Url), in order to get the FileID, before creating a LinkedEntityId for the record that the whole visualforce page was invoke from? Would that seem logical, or is there something glaring that I'm overlooking? |
Tony, I am looking to do the exact same thing as you. Were you able to accomplish it? If so, Please do share... THANK YOU! |
Hi,
Is it possible to use these API libraries to create a trigger that will move the file from the Salesforce side of its Files object, and into the associated Google Drive external data source?
My thought was that, if it were possible, you would be able to retain the functionality of uploading a file to a record - from desktop or mobile applications -, and be able to view that same file on both devices, all the while hosting the file on Google Drive, thereby avoid filling up your data allocation on the (costly) Force platform.
The text was updated successfully, but these errors were encountered: