function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raghu 1993Raghu 1993 

How to Save A file In Google Drive From SalesForce

Hi All,

     I am Trying to Save Attachement file in GoogleDrive,,,,But I strucked Can Any one help on this ......How to save a file In Google Drive From SalesForce,,
Below Code Shows the Creating The Attachement ,After Creating The Attachement in SalesForce How to Store In Goole Drive

 public PageReference AttachTorecord()
    {
        PageReference pdf= Page.ITReport;
         pdf.getParameters().put('id',orderRecord.id);
         Attachment att = new Attachment();
          att.Body = pdf.getContentAsPDF();
          att.ParentId =orderRecord.id ;
          att.Name = 'ITPDF.pdf';
          insert att;
    return new PageReference('/'+orderRecord.id);
Soumya BeheraSoumya Behera
Hey Raghu,

Good to see you in the developer community. I was also looking into the simiar stuff. Below are the link which might help you on the same.

https://theforcetimes.wordpress.com/tag/upload-files-from-salesforce-to-google-drive/
https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_files_connect_google_auth.htm&language=en_US#topic-title (https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_files_connect_google_auth.htm&language=en_US#topic-title)
http://help.salesforce.com/HTViewHelpDoc?id=admin_files_connect_google_xds.htm

I am going through the above link , you also refer the same . Please do let me know if you get any finding.

Regards,
Soumya Behera
sumit singh 37sumit singh 37
here is a link of script that you should use in your vf page
http://stackoverflow.com/questions/32272188/user-uploaded-file-to-google-drive-via-javascript