Do you need to link a Google doc to a Salesforce record? Do you need it done fast? There’s a quick, easy trick for getting it done: simply using a custom Salesforce URL field to link out to a document or folder in Google Drive.
Now, is this the best way to link Google docs to Salesforce records? I wouldn’t say so. Does it scale well at all? Absolutely not. But it’s fast, it’s simple, and everything you need to do it is pure Salesforce 101. Let’s take a look at how it works.
Creating a Custom URL Field
To add a custom URL field to a record page, navigate to the record where you’d like your custom field to appear and select Edit Object. You can also select your target object type directly from Object Manager in Setup.
Go to the Fields and Relationships tab and select New.
You’ll need to choose a type for your new field. Scroll to the bottom of the page and select URL.
Give your field a label & name and click Next. In the screens that follow, you’ll be able to manage field-level security and page layouts for the new field.
Adding Your Custom URL Field to Page Layouts
Now that you’ve created your custom field, it’s time to make it visible in page layouts and list views. Go to the Page Layouts tab in Object Manager and select a layout to add the URL field to.
Drag the new field onto the page and click Save.
If you’ve done everything right, you’ll see the URL field on the page layout you added it to.
For added convenience, you can also add the shiny new URL field to a list view. Navigate to the list view of your choice, click the List View Controls button, and choose Select Fields to Display.
Find your new field in the Available Fields list, move it to the Visible Fields list, and click Save.
When you populate this field with a URL, the Google Drive link will be available and clickable from this list view.
Linking Google Docs to Salesforce with a Custom URL Field
From here on out, it’s pretty simple – just go through your records and paste in the link to whichever Google Drive folder or file you’d like to add to the page. If you spend a lot of time in Google Drive and Salesforce, we might not need to walk you through this part. But just to cover our bases, let’s take this step by step.
First, head over to Google Drive, navigate to the folder or file you’d like to link to, and select Get Link.
Copy the link and make sure that the selected security settings will grant access to everyone who needs to interact with it in Salesforce.
Head back to Salesforce, edit your selected record, paste in the Google Drive link, and click Save.
And just like that…you’ve created a link to Google Drive from Salesforce!
Again, this isn’t the most sophisticated way to link Google docs to Salesforce records, but it has its selling points – it’s fast, free, and fairly easy. Having said that, if you spend a lot of time in these environments, it gets old clicking back and forth between tabs, and if you want one-click access to multiple folders, your page layouts are going to get very cluttered very quickly.
For a more powerful solution that’s just as easy to get up and running, check out Drive Connect, our AppExchange application that allows you to work with your Google Drive files directly from a Lightning component within Salesforce.