Salesforce Parent/Child



This is a simple mockup of integrating Salesforce with NetDocuments using parent/child workspaces (aka Client/Matter). In this example, existing Salesforce fields and a custom field are used. For more detailed information about integrating Salesforce with NetDocuments, please see the KB article, NetDocuments Salesforce Integration – Support Home.

To help map out the fields, let's look in Salesforce at the page for adding a new account.


The fields highlighted in yellow are the ones we are going to map to NetDocuments. The "Account Name", "Account Number" and "Account Site" are existing Salesforce fields. The "Client Name" field is a custom added field.

Salesforce field mappings to NetDocuments
Account Name = Child/Matter Name
Account Number = Child/Matter Key Number
Account Site = Parent/Client Key Number
Client Name = Parent/Client Name

Browsing to parent/child workspace

When Salesforce accesses a workspace, the "" and "account.AccountNumber" will be the values used to navigate to the workspace for the goID URL. Please see the Interactive API Guide for detailed information about using the goID URL.


Updating Lookup table

When updating or adding a row in the NetDocuments Lookup table that has a Parent/Child relationship, you must provide both the parent key and the child key. Generally a name/description is passed for each value as well. 

Parent Key and Name

Child Key and Name

Salesforce Configuration Steps

Custom Field - First we will add the custom field. On the left side under Build, select Customize==>Accounts==>Fields.

Add a new field by selecting the "New" button in the "Account Custom Fields & Relationships" section.


Add to NetDocuments Button - Next create a button to add the account in Salesforce to NetDocuments. This is used to add the information to NetDocuments Lookup tables. Notice we are passing the key values and the names for the Lookup table.

Customize==>Accounts==>Buttons, Links, and Actions


Below is the code for the "Add Account to ND (Text) =" field.{!API.Partner_Server_URL_70}&sfSession={!API.Session_ID}&id={!Account.Id}&key={!Account.AccountNumber}&name={!Account.Name}&parentkey={!Account.Site}&parentName={!Account.fnclientName__c}


Browse to workspace - Now we need to configure Salesforce to browse to the workspace.


Develop ==>Visualforce Pages



Visualforce Markup

<apex:page standardController="Account" title="NetDocuments workspace corresponding to an account">
<apex:iframe scrolling="true" title="Account Workspace" src="{!$Api.Session_ID}&sfUrl={!$Api.Partner_Server_URL_70}&smallDisplay=Y&wsParent={!URLENCODE(}&ws={!URLENCODE(account.AccountNumber)}&cabinet=NG-XXXXXXXX"/>