- Log into Salesforce as a Salesforce Admin
- For an existing custom object (for example, Custom_Object), create a new custom field in Custom_Object.
- Select Text.
- In the Field Label box, type FolderID. In the Length box, type 18 as the maximum length for the text box.
- Select the required access level for this object and click Next.
- Click Save.
- Create a new Visual Force page for Custom_Object, for example, Custom_Object_Box_Section
- Copy the following Visual Force page code and paste it in this new page.
<apex:page standardController="Custom_Object__c" extensions="box.DisplayWidget" showheader="false" sidebar="false" action="{!GetLoginToken}">
<apex:stylesheet value="{!URLFOR($Resource.box__BoxEmbed, 'BoxEmbed/style.css')}"/>
<apex:iframe src="/apex/box__BOXSection?id={!Custom_Object__c.Id}¶m=Custom_Object_Box_Section" rendered="{!DisplayBoxSection}"/>
<apex:iframe src="{!folderShareLink}" rendered="{!DisplayBoxWidget}" width="100%" height="100%" frameborder="0" scrolling="NO"/>
</apex:page
Note: Parameters marked in bold are variables. Change these parameters to match your enterprise setup. For example:
- Custom_Object__c: Change this variable to the API name of your custom object.
- Custom_Object__c.Id: Change this variable to the API name of your custom object ID field.
- Custom_Object_Box_Section: Change this variable to the API name of your Visual Force page.
- Add this newly created section to the Custom Object Page Layout. See the Embedding Box in Standard Object Records section for more details.
No comments:
Post a Comment