Dropbox for Salesforce: Advanced admin settings

Updated Dec 14, 2023

After setting up Dropbox for Salesforce with the standard configuration, you may want to customize your Dropbox for Salesforce integration as outlined in this article.

Use custom objects or standard objects beyond default configuration

To use custom objects or objects outside of those included in the default configuration (Account, Contact, Case, Opportunity, Lead), follow these instructions:

  1. Log in to the Salesforce website.
  2. Open the gear icon, and click Setup.
  3. Under the Platform Tools section, click Custom Code.
  4. Click Visualforce Pages.
  5. In the list of pages, click New.
  6. Add a Label and Name for your Visualforce page.
  7. Replace the Visualforce markup with one of the two code options below. The value for standardController will need to be replaced with the object API name. For a standard object, the API name is the name as the standard object. For example, the "Contracts" object API name is "Contract".
     

Dropbox for [Object]:

<apex:page standardController="INSERT—API—NAME—HERE" docType="html-5.0" showHeader="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false">
<Dropbox_for_SF:Dropbox />
</apex:page>
All of Dropbox for [Object]:
<apex:page standardController="INSERT—API—NAME—HERE" docType="html-5.0" showHeader="false" sidebar="false" applyHtmlTag="false" applyBodyTag="false">
  <Dropbox_for_SF:Dropbox AllDropbox="true" />
</apex:page>
  1. Click Save.

If you’re not using Salesforce Lightning, follow these instructions:
 

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Under Build, click Develop.
  4. Click Visualforce Pages.
  5. In the list of pages, click New.
  6. Add a Label and Name for your Visualforce page.
  7. Replace the Visualforce markup with the code detailed above. The value for standardController will need to be replaced with the object API name. For a standard object, the API name is the name as the standard object. For example, the "Contracts" object API name is "Contract".
  8. Click Save.

To update the Object layout with the above created Visualforce page, you need to follow the below instructions:

  1. Click Object Manager.
  2. Choose the object you wish to edit.
  3. Click Page Layouts.
  4. Choose the layout you want to edit.
  5. From the top settings box, drag-and-drop a Section onto the page.
  6. Fill in the Section Name and set the layout as one column.
  7. Click OK.
  8. Go to the Visualforce Pages item and drag-and-drop the corresponding page into the Dropbox section.
  9. Click Save.
  10. When the Visualforce Pages are added, click the wrench icon.
  11. On the option page, set the Visualforce page properties to 100% width and 400 pixels height and check the box for Show scrollbars.

If you are not using Salesforce Lightning, follow these instructions instead:
 

  1. Click Setup.
  2. In upper left search bar, search for “ObjectManager”.
  3. Choose the object you wish to edit and click Page Layouts on left side.
  4. Next to the layout you wish to work with, click the menu arrow and select Edit.
  5. From the top settings box, drag-and-drop a Section onto the page.
  6. Fill in the Section Name and set the layout as one column.
  7. Click OK.
  8. Go to the Visualforce Pages item and drag-and-drop the corresponding page into the Dropbox section.
  9. Click Save.
  10. When the Visualforce Pages are added, click the wrench icon.
  11. On the option page, set the Visualforce page properties to 100% width and 400 pixels height and check the box for Show scrollbars.

Secondly, you’ll need to setup a new object trigger for either your custom or non-default standard object by following these steps:

  1. Log in to the Salesforce website.
  2. Open the gear icon, and click Setup.
  3. Select the Object Manager under Objects and Fields.
  4. Select the custom object. 
  5.  Click Triggers.
  6. Click New.
  7. Copy the following code block into the entry field with the appropriate names subbed in.
Trigger <TRIGGER_NAME> on <OBJECT_API_NAME> (after update, after delete) {
    
        if(Trigger.isAfter && Trigger.isUpdate){
            Dropbox_for_SF.HandleRecordChange.OnRecordChange(Trigger.old, Trigger.new);
        }
    
        if(Trigger.isAfter && Trigger.isDelete){
            Dropbox_for_SF.HandleRecordChange.HandleMerge(Trigger.old);
        }
    
    }

If you’re not using Salesforce Lightning, follow these instructions to setup the custom object trigger:
 

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Under Build, click Create.
  4. Select Objects.
  5. Select custom object
  6.  In the Triggers section, click New
  7. Copy the code block above into the entry field with the appropriate names subbed in.

In order to resolve the code coverage issue, follow the below steps: 

  1. Add the following code as a custom Apex Class with the name CustomTests in the custom change set:
@isTest
public class CustomTest
{
  static testMethod void update<OBJECT_API_NAME>() {
      <OBJECT_API_NAME>  a = new <OBJECT_API_NAME> (Name='test');
      insert a;
      Test.startTest();
      a.Name = 'new test';
      update a;
      Test.stopTest();
      system.assertEquals('new test', a.name);
  }
}
  1. Rerun all tests in the Developer Console.

Enable Dropbox for Salesforce on Salesforce1 Mobile

To use Dropbox for Salesforce on Salesforce1 mobile, you'll first need to add a mobile card to the page layout.

  1. Log in to the Salesforce website.
  2. Open the gear icon, and click Setup.
  3. Under the Platform Tools section, click Objects and Fields.
  4. Click Object Manager.
  5. Choose the object you wish to edit.
  6. Click Page Layouts.
  7. Choose the layout you want to edit.
  8. Scroll down to Mobile Cards (Salesforce1 only) section.
  9. From the settings box at the top of your screen, click Visualforce Pages.
  10. Drag-and-drop Mobile Dropbox for [Object] into the Mobile Cards (Salesforce1 only) section.
  11. Click Save.

Next, you can make custom objects available for Salesforce1 Mobile. To make custom objects compatible with Salesforce1 mobile, you'll first need to enable this feature when setting up the Visualforce page. Follow these steps to make your custom objects viewable:

  1. Log in to the Salesforce website.
  2. Open the gear icon, and click Setup.
  3. Under the Platform Tools section, click Custom Code.
  4. Click Visualforce Pages.
  5. Click New.
  6. Give your page a Label and a Name.
  7. Check the Available for Salesforce mobile apps and Lightning Pages box.
  8. Copy and paste the code preceding these instructions, replacing the insert API name text with your object API name
  9. Click Save.

If you’re not using Salesforce Lightning, follow these instructions instead:
 

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Under Build, click Customize.
  4. Choose the object you wish to edit under the Customize section, and click Page Layouts.
  5. Next to the layout you wish to work with, click Edit.
  6. Scroll down to Mobile Cards (Salesforce1 only) section.
  7. From the settings box at the top of your screen, click Visualforce Pages.
  8. Drag-and-drop Mobile Dropbox for [Object] into the Mobile Cards (Salesforce1 only) section.
  9. Click Save.
     

Next, you can make custom objects available for Salesforce1 Mobile. To make custom objects compatible with Salesforce1 mobile, you'll first need to enable this feature when setting up the Visualforce page. Follow these steps to make your custom objects viewable:
 

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Under Build, click Develop.
  4. Click Visualforce Pages.
  5. In the list of pages, click New.
  6. Add a Label and Name for your Visualforce page.
  7. Give your page a Label and a Name.
  8. Check the Available for Salesforce mobile apps and Lightning Pages box.
  9. Copy and paste the code below, replacing the insert API name text with your object API name
  10. Click Save.

<apex:page standardController=“INSERT—API—NAME—HERE” docType =“html-5.0” showHeader=“false” sidebar=“false” applyHtmlTag=“false” applyBodyTag="false">
<Dropbox_for_SF:DropboxMobile / >
</apex:page>

Find the Salesforce Object API name

Every object in Salesforce has an API name. If you’re working with custom objects, you can find the API name by following these instructions.

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Under the build section in the left column, click Create.
  4. Click Objects from the drop-down options.
  5. Click the object's name.
  6. Clicking the object's label—you'll see the API name.

Create object record templates

Dropbox for Salesforce can build a folder structure for you using "template folders". These folders link your Salesforce records to folders in your Dropbox.

The folders Dropbox for Salesforce creates are empty by default. If you'd like them to contain subfolder structures of their own, the template folder feature can do that for you.

  1. Log in to the Salesforce website.
  2. Check which email address is connected to Dropbox for Salesforce.
    • Click the Dropbox Options tab in your Salesforce account, where you can see the email address
  3. From dropbox.com, open the Salesforce Documents folder.
  4. Click the name of the object folder you wish to work with.
  5. Create a new folder, and name it "template."
  6. Create the structure you want by adding files and folders into the template folder.
  7. In Salesforce, click the Dropbox Options tab.
  8. Scroll down to Standard Object Settings, and click Edit.
  9. Check the Enable Templates box next to the object you want to work with.
  10. Click Save.
highlighter icon

Notes:

  • Template folders are not retroactive. Any folder structures you've created prior to the new template folder structure you set up will not be affected
  • To trigger the generation of the template in a record, add a file into that record's Dropbox folder in the Salesforce Documents folder in your Dropbox
  • Template folders will only work for objects that reside in the public 'Salesforce Documents' folder. They are not currently compatible with objects in the 'Private Salesforce Documents' folder
  • Template folders don’t work for custom objects or for objects with a naming convention.

Follow Salesforce record names

By default, renaming a Salesforce record will not change the folder in your Dropbox. However, you can enable automatic renaming, which ensures that renaming a folder in Dropbox for Salesforce will also rename the folder in Dropbox.

  1. Log in to the Salesforce website.
  2. Click the Dropbox Options tab.
  3. Scroll down to Standard Object Settings, and click Edit.
  4. Click Follow Salesforce Record Names next to the objects you would like to enable auto-renaming for.
  5. Click Save.
highlighter icon

Notes:

  • If you're in a shared folder with automatic renaming enabled, Dropbox for Salesforce will update record names for everyone in the shared folder
  • For standard objects, automatic renaming can be configured by default. For custom objects, you will need to setup a trigger for that custom object as shown in the 'Use custom objects' section above

Modify sharing settings

Salesforce admins can set up Dropbox for Salesforce to follow their existing Salesforce security model. By default, Dropbox for Salesforce follows the Salesforce security model.

If you would like to modify the integration sharing settings, you can follow the instructions below:

  1. Log in to the Salesforce website.
  2. Click the Dropbox Options tab.
  3. Scroll down to Standard Object Settings, and click Edit.
  4. Check the Follow Salesforce Sharing box next to the objects you would like to enable.
  5. Click Save.
highlighter icon

Notes:

  • If you have Follow Salesforce Sharing enabled for objects with a Private Organization-wide sharing default, a Private Salesforce Documents folder will be created upon adding files/folders via the Dropbox component to new records. This folder will only be added to the record owner’s Dropbox account
  • New security settings are not retroactive—folders created prior to changes in your security settings will not follow your new security settings
  • Salesforce sharing settings can be found here: Setup > Security > Sharing Settings
  • The "Salesforce Documents" folder will need to be shared with all Dropbox for Salesforce users on the team 
  • Only Salesforce users who have access to the Private Salesforce object will see the Dropbox content through the Dropbox for Salesforce integration

Limit access to only your team

Salesforce admins can manage how a Salesforce user connects Dropbox to Salesforce.

  1. Log in to the Salesforce website.
  2. Click the Dropbox Options tab.
  3. Scroll down to the Dropbox Business section, and click Restrict login to Business accounts.
  4. Click Edit.
  5. Under Dropbox Business Access, check Team Members Only.
  6. Click Save.

Grant access to Salesforce users

  1. Log in to the Salesforce website.
  2. Open the gear icon, and click Setup.
  3. Under the Administration section, click Users.
  4. Click Profiles.
  5. Click the name of the profile you want to edit.
  6. Scroll down to Enabled Visualforce Page Access, and click Edit.
  7. Select all the pages that start with "Dropbox_for_SF".
  8. Click the Add arrow.
  9. Click Save.
  10. In the profile page you’ve been working in, scroll down to the Enabled Apex Class Access section, and click Edit.
  11. Select all the classes that start with Dropbox_for_SF.
  12. Click the Add arrow.
  13. Click Save.

If you’re not using Salesforce Lightning, follow these instructions instead:
 

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Go to the Administer section, and click Manage Users.
  4. Click Profiles.
  5. Click the name of the profile you want to edit.
  6. Scroll down to Enabled Visualforce Page Access, and click Edit.
  7. Select all the pages that start with "Dropbox_for_SF".
  8. Click the Add arrow.
  9. Click Save.
  10. In the profile page you’ve been working in, scroll down to the Enabled Apex Class Accesssection, and click Edit.
  11. Select all the classes that start with wbdbox.
  12. Click the Add arrow.
  13. Click Save.

Make your own folder name structure

Dropbox for Salesforce can create a folder structure that mirrors your Salesforce setup in Dropbox. However, admins can change the default structure or the naming conventions of the folders created on an object-by-object basis.

The standard naming convention for the “Contact” object is First Name, Last Name. However, you can change this to Last Name, First Name instead. If you make this change, the naming settings will then follow your naming preference upon creation.

  1. Log in to the Salesforce website.
  2. Open the gear icon, and click Setup.
  3. Under the Platform Tools section, click Objects and Fields.
  4. Click Object Manager.
  5. Choose the object you wish to edit.
  6. Click Fields & Relationships.
  7. Click New.
  8. Under Data Type, select Formula.
  9. Click Next.
  10. Type 'Custom Dropbox Path' in the Field Label box.
  11. Enter 'Custom_Dropbox_Path' in the Field Name box.
  12. Select Text under Formula Return Type, and click Next.
  13. Enter your formula (for example: "Contact/" & LastName & ", " & FirstName), and click Next.
  14. Select the Visible box next to the profiles you'd like to grant editing access.
  15. Click Next.
  16. Click Save.

If you’re not using Salesforce Lightning, follow these instructions instead:
 

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Under the Build section in the left column, click Customize.
  4. Select Contacts.
  5. Click Fields.
  6. Scroll down to the Contact Custom Fields & Relationships list, and click New.
  7. Under Data Type, select Formula.
  8. Click Next.
  9. Type "custom Dropbox Path" in the Field Label box.
  10. Enter 'Custom_Dropbox_Path' in the Field Name box.
  11. Select Text under Formula Return Type, and click Next.
  12. Enter your formula, and click Next.
  13. Select the Visible box next to the profiles you'd like to grant editing access.
  14. Click Next.
  15. Click Save.

highlighter icon

Notes:

  • Objects with a custom naming convention will have their record folders start appearing directly under the Salesforce Documents folder. If you wish to have record folders appear under the object folder (such as Contacts), as they would without custom naming then you’ll need to specify that in the added formula. For example, "Contact/" & LastName & ", " & FirstName
  • These changes are not retroactive—they only apply to newly created folders
  • You can use this process on all standard and custom objects, and you can add other fields, text, numbers, or dates to further customize your folder paths

Add Dropbox to Publisher Layouts

You can make the Dropbox interface accessible on Chatter. To do so, simply add Dropbox as a Quick Action in Global Publisher.

  1. Log in to the Salesforce website.
  2. Open the gear icon, and click Setup.
  3. Under the Platform Tools section, click User Interface.
  4. Click Global Actions.
  5. Click Publisher Layouts.
  6. Choose the object you wish to edit.
  7. Click Fields & Relationships.
  8. In the Action column, click Edit next to the Global Layout entry.
  9. Drag-and-drop Dropbox from the Quick Actions section to the Global Publisher section.

If you’re not using Salesforce Lightning, follow these instructions instead:
 

  1. Log in to the Salesforce website.
  2. Click Setup.
  3. Click Create.
  4. Click Global Actions.
  5. Click Publisher Layouts.
  6. In the Action column, click Edit next to the Global Layout entry.
  7. Drag-and-drop Dropbox from the Quick Actions section to the Global Publisher section.

Was this article helpful?

Let us know how why it didn't help:

Thanks for letting us know!

Thanks for your feedback!

Other ways to get help