Configuring S-Drive on Standard Objects
S-Drive comes out-of-the-box ready to configure for Accounts, Contacts, Cases, Opportunities, and Leads
In order to use S-Drive on these objects, we need to set up S-Drive on the record page. For Lightning, this means adding an S-Drive component to the Lightning Record Page. For Classic, it means setting up an override page.
S-Drive File Component for Lightning (Accounts, Cases, Contacts, Opportunities, Leads)
To display the S-Drive file component on Lightning pages for Account, Case, Contact, Opportunity and Lead standard objects, you need to edit each of these objects' pages, add the S-Drive Lightning Component to the page and configure it. We'll use the Account object as an example, but the process is the same for Case, Contact, Opportunity, and Lead.
Edit the Lightning page for an Account: Go to an Account, click on the "Setup" icon (gear wheel) on the top right corner and choose "Edit Page" option.
You will see "Lightning Components" section on the left-hand side. Scroll down to see the "SDrive" component, under "Custom".
Grab the SDrive component and drag it onto the page. Drop wherever you want the S-Drive component to be placed.
Edit the required fields correctly to configure the S-Drive component for Account Files (or Contacts, Cases, Opportunities, Leads) You can also change the settings for a selection of checkboxes , which are explained below in the Component Attributes section.
After clicking on "Save" button, you need to activate the page in order to use the S-Drive component. You can click on "Activation" and choose "Assign as Org Default" or "Assign as App Default" from the pop-up screen, in order to view the S-Drive component. Now, you should see "Account Files" page block at the end of the account object record page.
![](../__attachments/1944420622/image-20220830-144819.png?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
![](../__attachments/1944420622/image-20220524-210951.png?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
![](../__attachments/1944420622/image-20220524-211009.png?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
Component Attributes
The component attributes shown above are discussed in this section in detail. For the API names of these attributes, see S-Drive Configuration Attribute API Names
Title This is the title of the page block inside the object page. You can set it to "Account Files" (or Case Files, Contact Files, etc) or whatever title you like. This field is optional and if you don't provide a value for this field, it will be set to "S-Drive Files".
Use Custom Logo on Header Checking this box will enable inserting a custom logo, which will show on the top left of the S-Drive component in place of the S-Drive logo.
Logo Url Add the url for your logo. Note that if it is an external site, you will need to add that site to CSP Trusted Sites. (Go to Setup->CSP Trusted Site.)
Use Compact View Checking this box will enable a compact view of S-Drive which will help users to fit S-Drive into narrow spaces. In compact view, toolbar operations will be limited to the following: navigate to Home, upload files, download files and folders, create folders, navigate to recycle bin. See more at S-Drive Compact View Configuration below.
Parent object name This is the name of the object that the files will be attached to. For Account object, it will be "Account". For the other standard objects use Case, Contact, Opportunity or Lead.
Parent object prefix This is the object's namespace prefix that your Salesforce.com organization uses. For Account and other standard objects, you do not need to add an object namespace prefix so leave this field blank.
File object name This is the name of the custom object S-Drive uses to hold the information regarding the attached files. S-Drive comes with the custom File object associated with Account, Case, Contact, Opportunity, and Lead. The object name is "AccountFile_c" (CaseFilec, ContactFilec, OpportunityFilec, or Lead_File_c)
File object prefix This is the file object's namespace prefix that your Salesforce.com organization uses. If your organization has a namespace prefix and you created this custom object file inside this organization, your file namespace prefix is the same as your organization namespace prefix. If this file object belongs to a managed package, you need to use that managed package's namespace prefix. For Account, Case, Contact, Opportunity, or Lead set it to "cg__".
Relationship field name Master-detail relation used for selected standard object. You need to fill it in as "Account_r" (Caser, Contactr, Opportunityr, Lead_r)
Component Id If multiple S-Drive components are used in a page, this attribute should be set to a unique key for each component. For example: '1', 'a', etc.
Enable Copy URL This option is used to enable/disable "Copy URL" action on the action menu. If the checkbox is checked, you will be able to see the "Copy URL" link for each asset. The default value for this checkbox is checked.
Enable delete This option is used to enable/disable "Delete" toolbar button and action for all files on the page. The default value for this checkbox is checked.
Enable download This option is used to enable/disable "Download" option for all attachments in the page. If the checkbox is checked, you will be able to see the "Download" link for each asset. The default value for this checkbox is checked.
Enable edit This option is used to enable/disable "Edit" option for all attachments in the page. If the checkbox is checked, you will be able to see the "Edit" link for each asset. The default value for this checkbox is checked.
Enable e-mail This option is used to enable/disable "E-Mail" option for all attachments in the page. If the checkbox is checked, you will be able to see the "E-Mail" link for each asset. The default value for this checkbox is checked.
Default email address You can use this option, if you want to set a default "Additional To" email address for sending emails from your S-Drive Attachments. For example, if you select an Account S-Drive Attachment for an account and click "Email" button, "Email Files" screen will be opened and "Additional To" field will be filled with the email address you have provided here.
Enable upload This option is used to enable/disable "Upload" option for all attachments in the page. If the checkbox is checked, you will be able to see the "Upload File(s)" link for each asset. The default value for this checkbox is checked.
Use Legacy Upload If this is checked, a visualforce upload page is used instead of the Lightning upload page
Enable Drop Zone This option is used to configure drop zone in S-Drive components. Select/deselect the checkbox to enable or disable the drop zone.
Enable Bulk Field Update on Upload This option enables the Bulk Field Update pullout menu on the Lightning Upload page. It is ignored for Legacy upload.
Preserve Folder Structure on Upload If this is checked, then when dropping a folder on the Lightning upload page, the files will remain in the folders and subfolders, not “flattened” into the same level. Available only on Lightning upload, not Legacy upload.
Allowed file extensions You can use this option if you want to limit the file types to be uploaded into selected object's S-Drive attachments. Semicolon separated list of file extensions that are allowed to be uploaded can be written here. This attribute is optional and leaving this empty will allow all kind of files to be uploaded. For example, "*.jpg, *.txt" will limit the files to be uploaded to jpg and txt files.
Enable folders This option is used to enable/disable folder support for S-Drive attachments in the page. If the checkbox is checked, you will be able to see the "New Folder" button. The default value for this checkbox is checked. If the box is not checked, the "New Folder" button will be removed from the toolbar section.
Enable private files This option is used for enabling public/private file access to the S-Drive attachments and commonly used to limit the customer portal users' access to individual files. The ability for users to configure this is determined by the main configuration settings in S-Drive Configuration Tab. If the checkbox is checked, you will see the public/private flag. Set this attribute to true by checking the checkbox, if you want to enable private/public flag. Setting the private flag on a file hides the file from customer portal users. The default value for this checkbox is unchecked.
Enable Public Share This option is used to configure public share in S-Drive components. Select the checkbox to see Public Share option in Actions Menu. Deselect the checkbox to disable Public Share in Actions Menu.
Enable Chatter This option is used for enabling/disabling Chatter for Account files. If you enable this option, you will be able to use functions such as 'Post to Chatter' and will be able to view the Chatter feed of each Account file.
Disable Cut Copy Paste This option is used for enabling/disabling cut/copy-paste options. Set this attribute to true by checking the checkbox if you want to disable cut/copy-paste operations.
Enable Shortcut Creation This option is used to configure Shortcut Creation in S-Drive components. Select the checkbox to see Create Shortcut button on toolbar. Deselect the checkbox to disable Create Shortcut button on toolbar.
Enable List View This is checked by default and enables the option to show files in list view (rather than Thumbnail or Grid view) if Preview and Thumbnail is enabled.
Enable Thumbnail View This enables the toolbar button to show files in Thumbnail view (rather than List View or Grid view) if Preview and Thumbnail is enabled.
Enable Grid View This enables the toolbar button to show files in Grid view (rather than List or Thumbnail view) if Preview and Thumbnail is enabled.
Enable Settings This enables the Settings (gear wheel) toolbar button, which allows users to set the view type, sort field and whether the bread crumbs and folder tree show. The settings only save for the session unless the user has Admin privileges.
Enable Search Shows the search box if checked
Enable Open Original File Setting this to true adds the “open original file” action to shortcut files
Default sort field name This option is used to order/sort S-Drive documents based on a field. You need to set the name of the field that should be used to order the list of files. For this example, it should be filled in as "cg_File_Namec". You can change this option from the settings button located at the toolbar of S-Drive attachments anytime. _See "S-Drive Lightning User Guide" for more information about using the S-Drive attachments.
Default sort order This option is used to set the sort order direction of the S-Drive documents. There are two possible values for this attribute: "asc" or "desc". The default value is "asc" which stands for ascending. You can change this option from the settings button located at the toolbar of S-Drive attachments anytime. See "S-Drive Lightning User Guide" for more information about using the S-Drive attachments.
Files Count for A Page This option is to set the number of files to be shown in an attachment page. The default value for this section is set to 100. If this value is set to '30' and object has 91 total items, the files will be displayed in 4 pages. You can change this option from the pagination setting located under the toolbar of S-Drive attachments. See "S-Drive Lightning User Guide" for more information about using the S-Drive attachments.
Default view type This option is to set the default view type of the file list table. There are 3 options you can choose: List, Thumbnail and Grid. You can change this option from the toolbar of S-Drive attachments and set it as default by using the settings button. See "S-Drive Lightning User Guide" for more information about using the S-Drive attachments.
Show Folder Tree This option sets the default behavior of the folder tree component located on the left-hand side of the S-Drive attachments page. You can choose to hide or show the Folder Tree component by using the settings button on the toolbar of S-Drive attachments. See "S-Drive Lightning User Guide" for more information about using the S-Drive attachments.
Show Recycle Bin Button The option determines whether the green Recycle Bin button that can be shown below the folder tree is displayed. When active, this button shows all files in the recycle bin.
Show Checked Out Files Button The option determines whether the blue Checked Out Files button that can be shown below the folder tree is displayed. When active, this button shows all files that are checked out.
Show Legal Hold Files Button The option determines whether the blue Legal Hold Files button that can be shown below the folder tree is displayed. When active, this button shows all files that have a legal hold on them.
Show Breadcrumb This option sets the default behavior of the breadcrumbs located on the left-hand side of the S-Drive attachments page, above the folder tree component. You can choose to hide or show the breadcrumbs by using the settings button on the toolbar of S-Drive attachments. See "S-Drive Lightning User Guide" for more information about using the S-Drive attachments.
Open File After Clicking on It This option is used to configure the behavior when a file is clicked on. Select the checkbox to open the file when it is clicked on. Deselect the checkbox to go to the Details view of the file.
Enable Field Selection This option is used to configure Fields button on toolbar which is used to select and display fields. Select the checkbox to enable the button on toolbar and deselect the checkbox to hide.
Enable Online Editing This option adds the “Open in Microsoft” action (allowing files to be edited in Microsoft without downloading them) to the action menu for Word, Powerpoint and Excel files if Content Authoring is configured.
Enable Manual Sharing This option determines whether manual sharing is allowed on files. It is only used on customer file objects that have a lookup relationship to the parent.
Enable Inherit Sharing Checkbox This option controls whether the Inherit Sharing checkbox is shown or hidden when creating subfolders and uploading files. If checked, it is shown.
Enable Inherit Sharing by Default This option controls whether the Inherit Sharing checkbox is checked or unchecked by default. If you hide the Inherit Sharing checkbox, you still need to use this setting to determine whether Inherit Sharing is true or false when subfolders are created and files are uploaded.
Show Audit Tab This option determines whether or not the Audit Tab is shown when clicking on file details.
S-Drive Compact View Configuration
In order to use S-Drive in narrow spaces in Lightning Experience, you can use the configuration option, "Use Compact View" checkbox.
![](../__attachments/1944420622/worddavb96a54d9f66fe124d5a5ef3764b7bb20.png%3Fversion=1&modificationDate=1614710465640&cacheVersion=1&api=v2&width=284&height=256?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
The compact view enabled S-Drive component will look like the following:
![](../__attachments/1944420622/worddav7b5ad4415f72997e6ef9f7c686247b09.png%3Fversion=1&modificationDate=1614710466251&cacheVersion=1&api=v2&width=385&height=238?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
Note that the search bar is not available in compact view.
In compact view, the number of fields that are shown in the file list is limited. As you configure your fields in the S-Drive Configuration tab, the first four fields will be shown in the compact view, including the File Name field.
![](../__attachments/1944420622/worddav376eb682e43ae516d31bb7bc2d0751c3.png%3Fversion=1&modificationDate=1614710466883&cacheVersion=1&api=v2&width=439&height=177?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
In a configuration like the figure above for Account Files, the following fields will be shown in the component: File Name, Description, File Size and Created By ID.
S-Drive Email Lightning Component
The Email Lightning component allows users to write emails with attachments of files from S-Drive. You can place the email component on any lightning page with the Lightning App builder and attach files of any file object type from any record. If you have Enhanced Emails enabled in your org, emails sent from S-Drive email component will show up in your email Activity History.
Enabling S-Drive Email
Open the Lightning App Builder by clicking on the cog wheel at the top right corner of your Object record page and click on "Edit Page".
![](../__attachments/1944420622/worddav0349ccf4d98e822f5aa91a09697f4877.png%3Fversion=1&modificationDate=1614710467546&cacheVersion=1&api=v2&width=500&height=203?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
Drag and drop the S-Drive E-Mail component from the lightning components panel to your desired location in the Lightning page editor.
![](../__attachments/1944420622/worddav5afc3b44a3717c88911b5e3eb80b1963.png%3Fversion=1&modificationDate=1614710468352&cacheVersion=1&api=v2&width=199&height=225?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)
S-Drive File Area for Classic (Accounts, Cases, Contacts, Opportunities, Leads)
For Account, Case, Contact, Opportunity and Lead standard objects, the associated S-Drive file objects and override pages for Salesforce Classic are bundled with the S-Drive installation. If you'll use S-Drive attachments for these standard objects as override, you can use bundled objects and/or pages where appropriate. If you are planning to use S-Drive Attachments for other standard/custom objects or as override/inline, please refer to the "S-Drive Advanced Configuration Guide" document.
"Overriding the view of the object" means that the page will be used as an override to the standard object page. In this case, 'S-Drive Attachments' will be a section at the end of the standard page layout.
In Salesforce Classic view, click Setup button on right top and go to Build-> Customize-->Accounts (or Cases or Contacts or Opportunities or Leads the label of the object that you want to enable S-Drive Attachments for) -> Buttons, Links, and Actions.
Click Edit next to the View Label.
Select Visualforce Page for Override With section and pick related Visualforce page (AccountFilePage for Accounts, CaseFilePage for Cases, ContactFilePage for Contacts, OpportunityFilePage for Opportunities, LeadFilePage for Leads) from the drop-down box. Click Save button to complete the override.
Now it will display View as Overridden in the Buttons, Links, and Actions section (Figure 5 4).
After creating an account object, you should see "Account Files" (similar screens for Cases, Contacts and Opportunities and Leads once you configure) page block at the end of the object detail page.
![](../__attachments/1944420622/worddavc1536f9e9d73aeb93bd9c243b25d2bf7.png%3Fversion=1&modificationDate=1614710460298&cacheVersion=1&api=v2&width=511&height=70?inst-v=45374f53-f4b0-4a30-83dc-edc14e9d1f8c)