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
harsh_chandraharsh_chandra 

Google Doc Button Tweak

Hi All,

In my org Google doc is enabled. Now, I am trying to pull standard 'Add Google Doc' button in my custom Visual force page by tweaking the HTML and JS code behind it. Good thing is that I am able to pull the button and its four dropdown values i.e 'New Document', 'New Spreadsheet', 'New Presentation' and 'Add Existing' and onclick of any of the above, a popup is also coming same as standard popup. 

 

Problem:
When I click 'Create Google Doc' button from popup window a URL is generated and after 1 or 2 second of processing, it redirecting me to home page where as in standard popup, on click of button it process and redirect me to email login page.

My URL:
https://cs15.salesforce.com/_ui/core/google/docs/GoogleDocAuthenticate/d?denied=%2F_ui%2Fcore%2Fgoogle%2Fdocs%2FGoogleDocDenied%2Fd&next=%2F_ui%2Fcore%2Fgoogle%2Fdocs%2FGoogleDocSuccess%2Fd%3Fmethod%3D0%26docName%3DTestBlankFile%26parentId%3Da0Ie00000077ERc%26docType%3DDOCUMENT%26secret%3D13584911

Standard URL:
https://cs15.salesforce.com/_ui/core/google/docs/GoogleDocAuthenticate/d?denied=%2F_ui%2Fcore%2Fgoogle%2Fdocs%2FGoogleDocDenied%2Fd&next=%2F_ui%2Fcore%2Fgoogle%2Fdocs%2FGoogleDocSuccess%2Fd%3Fmethod%3D0%26docName%3DTestBlankFile%26parentId%3Da0Ie00000077ERc%26docType%3DDOCUMENT%26secret%3D28374059

 

Please advise, if anyone has done this before.

 

Thanks

crop1645crop1645
Hi harsh_chandra

I've experienced the same phenomenon; see http://salesforce.stackexchange.com/questions/25761/add-google-doc-button-into-custom-notes-and-attachments-visualforce-component  

I also noted the same behavior usiing a simple apex:relatedList list="CombinedAttachments".

Did you ever resolve this?  I have an open case with Dev Support
harsh_chandraharsh_chandra

Hi,

I haven't found any solution for my above question. However, I have implemented a workaround by building the VF page UI same as standard google doc popup with blury background and in backend handle the logic with APIs. 

Thanks,

Harsh