Embedding Box Custom Object Records

  1. Log into Salesforce as a Salesforce Admin
  2. For an existing custom object (for example, Custom_Object), create a new custom field in Custom_Object. 
    1. Select Text.
    2. In the Field Label box, type FolderID. In the Length box, type 18 as the maximum length for the text box.
    3. Select the required access level for this object and click Next.
    4. Click Save.
  3. Create a new Visual Force page for Custom_Object, for example, Custom_Object_Box_Section 
  4. 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}&param=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.
    1. 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