You can follow below instructions to setup S-Drive as inline component.
- Go to https://login.salesforce.com and login to your Salesforce account.
- Go to Setup -> Develop -> Pages and click New button.
- Type Label and Name as “InlineAccountPage” and paste below content into the Visualforce Markup section (This example is for making Account Files, but you can apply same for other standard/custom objects):
<apex:page standardController="Account" tabStyle="Account"> <cg:AttachmentComponent title="Account Files" customObjectName="Account" customObjectFileName="AccountFile__c" fileNamespacePrefix="cg__" objectNamespacePrefix="cg__" inline="true" relationshipName="Account__r" objectId="{!Account.Id}" /> </apex:page>
- Important Note: You need to use
.Id notation (e.g. Account.Id) for objectId property above. Do not use Id directly. - You can modify the page content and AttachmentComponent properties based on your needs (refer to the Component Reference in edit page) and Save the page.
- Again, go to Setup -> Develop -> Pages and click Security link next to the InlineAccountPage and select profiles that you want this page to be visible.
- Go to Setup -> Customize -> Accounts -> Buttons, Links, and Actions section and click Edit next to the View label.
- Select Override With Visualforce Page and then select No override (use default) from the dropdown. Click Save button.
- Go to Setup -> Customize -> Accounts -> Page Layouts section and click Edit next to the Account Layout page layout name.
- Select Visualforce Pages and then InlineAccountPage from the top section. Drag and drop the InlineAccountPage to an appropriate section in the page layout.
- Click right-top Properties icon of the dropped page and set:
- Height to 500
- Check Show scrollbars
- Save the page layout.
- Now you can go to individual accounts and create folders, upload files etc. to your account objects using S-Drive with an inline component view.