Solution: Since S-Docs is a Native Force.com app, it integrates seamlessly with Salesforce Chatter. Enabling Chatter on S-Docs will allow users to comment (Chatter) on specific S-Docs, and notify any user ‘following’ an S-Doc of changes. For general information on how to configure Chatter, please start with this tutorial.
S-Docs uses a junction object (S-Docs Relationships) to relate generated S-Docs to your Salesforce records. As explained in Solution #3, this provides much more flexibility. When enabling S-Docs for Chatter, we recommend enabling the Chatter feed on the S-Docs Relationship object, not on the S-Doc object itself.
First, navigate to Build > Customize > Chatter > Chatter Settings and make sure the Chatter feature is enabled for your org. Next, navigate to Build > Customize > Chatter > Feed Tracking. From here, select the “SDOC Relationship” object, as shown below:
Then, check Enable Feed Tracking to be able to select fields to track. Typically, customers will want to track just the “Status” and “Comment” fields, as these are the fields that are most meaningful to track. If you integrate S-Docs with an electronic signature solution like S-Sign, users could be notified via the Chatter feed that documents have been executed by the customer.
Now that you have Chatter enabled and Feed Tracking set, you will need to make one additional change. You will need to create a hyperlink on the S-Docs related list that can take the user to the S-Docs Relationship record detail page. This is the only page where users can click on the Follow button located on the Chatter toolbar.
Background: By default, there is no such hyperlink on the S-Docs related list, and this was done intentionally. While the S-Docs related list includes a column labeled “Document Number,” this field is a plain text field (not a hyperlink). If this field were a hyperlink, the user might expect this to open the S-Docs itself – not the S-Docs Relationship record. To eliminate any confusion, the hyperlink was intentionally removed. However, for Chatter, we do need to get to the S-Docs Relationship record in order to allow users to click on the Chatter Follow button. Unfortunately, the first column in the related list (“Edit” link) won’t work either. While this link does take the user to the S-Docs Relationships page, it is rendered in edit mode, and the Chatter toolbar does not render for records in edit mode. So, you will need to add a new column to your S-Docs related list view that will take the user to the S-Docs Relationships record detail page. While you might first consider using the Relationship ID field as an easier approach, this ID value would display the S-Doc Relationship ID, not the S-Doc ID, which again may confuse users. A formula field rendered as a hyperlink is the best solution. Since each org will have its own preference on how this related list column should appear, we have not included this formula field in the core S-Docs package, but rather leave it up to the Salesforce Admins to implement.
You will need to create this hyperlink using a custom formula field on the SDOC_Relationship__c object. You will then add this field to the related list view.
By using the formula below, you could include a new column that replaces “Document Number” with the same value but is a hyperlink to the S-Doc Relationship record. (For comparison only, both columns are included in the related list shown below.)
The table below describes the intended behavior we are seeking:
|Column 1 (Edit link)||Open S-Docs Relationship record in edit mode. User can add/edit comments or change S-Doc status.|
|Column 3 (Excel icon)||Opens the actual S-Doc in new window (e.g. launches MS Excel).|
|Column 5 (S-Doc Link)||Opens S-Doc Relationship detail in same window. Users could then click on the “Follow” icon from the Chatter toolbar.|
The example below uses an alternative link. The following formula will create a “Set Chatter Prefs” link field that you then add to the related list layout.
HYPERLINK('/'+ Id , “Set Chatter Prefs”, "_self" )
Once you’ve added the link to the relationship object, the user simple opens the record and then clicks on the follow icon.