Integrating FileHold in the Salesforce Accounts Page

There are many scenarios where it is desirable to integrate documents stored in FileHold with other systems. FastFind is a popular integration method because it requires no special knowledge or technical skills. However, sometimes a tighter integration is desired where FileHold data appears directly with another application.

Starting with FileHold 14.2 it is possible to execute a search using a simple web address. The search results can be configured to be hosted by a non-FileHold web page as though they are an integral part of that page.

Many companies use Salesforce as their CRM system. There are many methods to customize Salesforce pages for special purposes such as displaying FileHold search results. This article will demonstrate a basic method making this integration possible. We will amend the Salesforce account page with a list of documents inside FileHold that are related to the Salesforce account. We will also add a button to popup search results.

This article assumes the reader has knowledge of typical internet technologies such as HTML and Salesforce Apex programming and they have a Salesforce account with Apex authoring permissions. They will also need library administration skills for FileHold.

The first step for using the search by URL feature of FileHold is to create a saved quick search using the regular client user interface. The search will generally require a piece of information that exists in both systems, so it can be used to create a virtual link between them. Salesforce has a unique 18 character account id. We will add this id to documents as we save them in FileHold. This id will be the link between the two systems.

Do not use the 15 character Salesforce account id for this purpose as it includes upper and lower case letters to make it unique. The FileHold search is not case sensitive, so there is a possibility that two accounts could get mixed up with the short id.

We will create a new metadata field called “Salesforce id” and add it to each of the document schemas that we want to display on the Salesforce account page.

Salesforce ID in metadata pane

We will create an advance search for the common Salesforce id field and save it as a quick search called “Salesforce” giving all Salesforce users permissions to the search in FileHold.

Salesforce ID in saved search

Finally we need to define a search view that will display the columns and sort order we want to see on the Salesforce account page. We will likely only want to display 5 lines of results at a time, so we can set that also using the web client view preferences. With the view defined we can set it as the default view for the saved search.

With the configuration of FileHold complete we can move on to preparing the integration on the Salesforce side. First we will need to form the URL we will use in Apex. We can get a head start on this using the FileHold URL builder. Start by creating a VisualForce page. Call it “Related Documents” or something similar. Add the following Apex code.

<apex:page standardcontroller="Account" showHeader="false">
    Account Id<apex:outputText escape="false" value="<b>"/> {!Account.Id}<apex:outputText escape="false" value="</b>"/>
    <apex:iframe src="{!Account.Id}&ui=lock&titlebar=disable&summarybar=disable&vpagebars=Bottom&hpagebars=Left" scrolling="true" id="theIframe"/>

The first and last line define the VisualForce page. The second line provides a human readable 18 digit account id for convenience for this example. Users can easily cut and paste this value into FileHold metadata as they add documents. The third line does all the work. Most of it can be generated in the web client using the URL Builder feature. The sample account id entered in the URL Builder has been replaced with the internal Salesforce account id variable.

Salesforce Visualforce editor

With the VisualForce page complete it is a simple matter to add the page to the account layout.

Salesforce Visualforce page layout

The search can appear in line with the account page or attached to a button to popup as a new Window plus other options.

Salesforce and FileHold integration

And, with that, you have your customer documents at your finger tips in Salesforce.

Russ Beinder

Russ Beinder is the Chief Technology Officer at FileHold. He is an entrepreneur, a seasoned business analyst, computer technologist and a certified Project Management Professional (PMP). For over 35 years he has used computer technology to help organizations solve business problems.