Dropbox for Salesforce: Advanced admin settings
The information in this article applies to admins on Dropbox Standard, Business, Advanced, Business Plus, and Enterprise.
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:
- Log in to the Salesforce website.
- Open the gear icon, and click Setup.
- Under the Platform Tools section, click Custom Code.
- Click Visualforce Pages.
- In the list of pages, click New.
- Add a Label and Name for your Visualforce page.
- 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>
<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>
- Click Save.
If you’re not using Salesforce Lightning, follow these instructions:
- Log in to the Salesforce website.
- Click Setup.
- Under Build, click Develop.
- Click Visualforce Pages.
- In the list of pages, click New.
- Add a Label and Name for your Visualforce page.
- 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".
- Click Save.
To update the Object layout with the above created Visualforce page, you need to follow the below instructions:
- Click Object Manager.
- Choose the object you wish to edit.
- Click Page Layouts.
- Choose the layout you want to edit.
- From the top settings box, drag-and-drop a Section onto the page.
- Fill in the Section Name and set the layout as one column.
- Click OK.
- Go to the Visualforce Pages item and drag-and-drop the corresponding page into the Dropbox section.
- Click Save.
- When the Visualforce Pages are added, click the wrench icon.
- 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:
- Click Setup.
- In upper left search bar, search for “ObjectManager”.
- Choose the object you wish to edit and click Page Layouts on left side.
- Next to the layout you wish to work with, click the menu arrow and select Edit.
- From the top settings box, drag-and-drop a Section onto the page.
- Fill in the Section Name and set the layout as one column.
- Click OK.
- Go to the Visualforce Pages item and drag-and-drop the corresponding page into the Dropbox section.
- Click Save.
- When the Visualforce Pages are added, click the wrench icon.
- 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:
- Log in to the Salesforce website.
- Open the gear icon, and click Setup.
- Select the Object Manager under Objects and Fields.
- Select the custom object.
- Click Triggers.
- Click New.
- 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:
- Log in to the Salesforce website.
- Click Setup.
- Under Build, click Create.
- Select Objects.
- Select custom object
- In the Triggers section, click New
- 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:
- 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);
}
}
- 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.
- Log in to the Salesforce website.
- Open the gear icon, and click Setup.
- Under the Platform Tools section, click Objects and Fields.
- Click Object Manager.
- Choose the object you wish to edit.
- Click Page Layouts.
- Choose the layout you want to edit.
- Scroll down to Mobile Cards (Salesforce1 only) section.
- From the settings box at the top of your screen, click Visualforce Pages.
- Drag-and-drop Mobile Dropbox for [Object] into the Mobile Cards (Salesforce1 only) section.
- 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:
- Log in to the Salesforce website.
- Open the gear icon, and click Setup.
- Under the Platform Tools section, click Custom Code.
- Click Visualforce Pages.
- Click New.
- Give your page a Label and a Name.
- Check the Available for Salesforce mobile apps and Lightning Pages box.
- Copy and paste the code preceding these instructions, replacing the insert API name text with your object API name.
- Click Save.
If you’re not using Salesforce Lightning, follow these instructions instead:
- Log in to the Salesforce website.
- Click Setup.
- Under Build, click Customize.
- Choose the object you wish to edit under the Customize section, and click Page Layouts.
- Next to the layout you wish to work with, click Edit.
- Scroll down to Mobile Cards (Salesforce1 only) section.
- From the settings box at the top of your screen, click Visualforce Pages.
- Drag-and-drop Mobile Dropbox for [Object] into the Mobile Cards (Salesforce1 only) section.
- 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:
- Log in to the Salesforce website.
- Click Setup.
- Under Build, click Develop.
- Click Visualforce Pages.
- In the list of pages, click New.
- Add a Label and Name for your Visualforce page.
- Give your page a Label and a Name.
- Check the Available for Salesforce mobile apps and Lightning Pages box.
- Copy and paste the code below, replacing the insert API name text with your object API name.
- 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.
- Log in to the Salesforce website.
- Click Setup.
- Under the build section in the left column, click Create.
- Click Objects from the drop-down options.
- Click the object's name.
- 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.
- Log in to the Salesforce website.
- 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
- From dropbox.com, open the Salesforce Documents folder.
- Click the name of the object folder you wish to work with.
- Create a new folder, and name it "template."
- Create the structure you want by adding files and folders into the template folder.
- In Salesforce, click the Dropbox Options tab.
- Scroll down to Standard Object Settings, and click Edit.
- Check the Enable Templates box next to the object you want to work with.
- Click Save.
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.
- Log in to the Salesforce website.
- Click the Dropbox Options tab.
- Scroll down to Standard Object Settings, and click Edit.
- Click Follow Salesforce Record Names next to the objects you would like to enable auto-renaming for.
- Click Save.
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:
- Log in to the Salesforce website.
- Click the Dropbox Options tab.
- Scroll down to Standard Object Settings, and click Edit.
- Check the Follow Salesforce Sharing box next to the objects you would like to enable.
- Click Save.
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.
- Log in to the Salesforce website.
- Click the Dropbox Options tab.
- Scroll down to the Dropbox Business section, and click Restrict login to Business accounts.
- Click Edit.
- Under Dropbox Business Access, check Team Members Only.
- Click Save.
Grant access to Salesforce users
- Log in to the Salesforce website.
- Open the gear icon, and click Setup.
- Under the Administration section, click Users.
- Click Profiles.
- Click the name of the profile you want to edit.
- Scroll down to Enabled Visualforce Page Access, and click Edit.
- Select all the pages that start with "Dropbox_for_SF".
- Click the Add arrow.
- Click Save.
- In the profile page you’ve been working in, scroll down to the Enabled Apex Class Access section, and click Edit.
- Select all the classes that start with Dropbox_for_SF.
- Click the Add arrow.
- Click Save.
If you’re not using Salesforce Lightning, follow these instructions instead:
- Log in to the Salesforce website.
- Click Setup.
- Go to the Administer section, and click Manage Users.
- Click Profiles.
- Click the name of the profile you want to edit.
- Scroll down to Enabled Visualforce Page Access, and click Edit.
- Select all the pages that start with "Dropbox_for_SF".
- Click the Add arrow.
- Click Save.
- In the profile page you’ve been working in, scroll down to the Enabled Apex Class Accesssection, and click Edit.
- Select all the classes that start with wbdbox.
- Click the Add arrow.
- 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.
- Log in to the Salesforce website.
- Open the gear icon, and click Setup.
- Under the Platform Tools section, click Objects and Fields.
- Click Object Manager.
- Choose the object you wish to edit.
- Click Fields & Relationships.
- Click New.
- Under Data Type, select Formula.
- Click Next.
- Type 'Custom Dropbox Path' in the Field Label box.
- Enter 'Custom_Dropbox_Path' in the Field Name box.
- Select Text under Formula Return Type, and click Next.
- Enter your formula (for example: "Contact/" & LastName & ", " & FirstName), and click Next.
- Select the Visible box next to the profiles you'd like to grant editing access.
- Click Next.
- Click Save.
If you’re not using Salesforce Lightning, follow these instructions instead:
- Log in to the Salesforce website.
- Click Setup.
- Under the Build section in the left column, click Customize.
- Select Contacts.
- Click Fields.
- Scroll down to the Contact Custom Fields & Relationships list, and click New.
- Under Data Type, select Formula.
- Click Next.
- Type "custom Dropbox Path" in the Field Label box.
- Enter 'Custom_Dropbox_Path' in the Field Name box.
- Select Text under Formula Return Type, and click Next.
- Enter your formula, and click Next.
- Select the Visible box next to the profiles you'd like to grant editing access.
- Click Next.
- Click Save.
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.
- Log in to the Salesforce website.
- Open the gear icon, and click Setup.
- Under the Platform Tools section, click User Interface.
- Click Global Actions.
- Click Publisher Layouts.
- Choose the object you wish to edit.
- Click Fields & Relationships.
- In the Action column, click Edit next to the Global Layout entry.
- 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:
- Log in to the Salesforce website.
- Click Setup.
- Click Create.
- Click Global Actions.
- Click Publisher Layouts.
- In the Action column, click Edit next to the Global Layout entry.
- Drag-and-drop Dropbox from the Quick Actions section to the Global Publisher section.