Salesforce Parent/Child

Follow

 

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.

mceclip4.png

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 "account.site" 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.

wsParent={!URLENCODE(account.site)}
ws={!URLENCODE(account.AccountNumber)}

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
parentkey={!Account.Site}
parentName={!Account.fnclientName__c}

Child Key and Name
key={!Account.AccountNumber}
name={!Account.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.

mceclip5.png

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

mceclip3.png

Below is the code for the "Add Account to ND (Text) =" field. 

https://vault.netvoyage.com/neWeb2/sf/lookupImp.aspx?sfUrl={!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.

Build

Develop ==>Visualforce Pages

ndAccountWS

mceclip0.png

Visualforce Markup

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