Skip to main content
Skip table of contents

Email "S-Drive Tab" Files from an Object using a Custom Button (Classic)

In Lightning, you can use the S-Drive Email component to email S-Drive files from any other object.

Note: This feature can be enabled by using "Attach from S-Drive Folders" button on any S-Drive object. Refer to "Emailing Files" section of S-Drive User Guide.

Creating this button allows you to email files stored on S-Drive tab from other objects. Instructions for Case Files are provided below, but you can follow the same instructions for Accounts, Contacts, Opportunities or other standard/custom objects:

  1. Navigate to Setup -> Customize -> Cases -> Buttons, Links and Actions. Click New Button or Link button.

  2. Fill in Label and Name fields, select Display TypeBehavior and Content Source areas as in the figure below then type'apex/cg_Sdrive?objectId={!Case.Id}') into the formula area. If you would like to open S-Drive page as inline and without header, type'apex/cg_Sdrive?objectId={!Case.Id}&inline=1') instead (Figure 9 28).

    Click Save

  3. Make sure that you have added the custom button into Case page layout. You can't see the "Email S-Drive File" custom button on Case page, if you do not add to the Case object's page layout.

  4. Open a case record and click on the custom button

  5. Select files to send as an email and click Email button

  6. You can see that "Related to" field is populated with related Case (Figure 9-31). Fill in the
    other fields and click Send button.

  7. You can follow the same instructions for other objects. If you would like to create a custom
    button on Account, apply all the instructions for Account object and type
    "objectId={!Account.Id}" into formula area, instead of "objectId={!Case.Id}" while creating a
    custom button on Account. For any object, type "objectId={!ApiNameOfAnyObject.Id}" into
    formula area.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.