Link One Document to Many Objects

The S-Doc Relationship Object

You can relate many records to the same S-Doc by leveraging the SDoc_Relationship__c junction object.

By default, one S-Doc record can be simultaneously related to up to 9 distinct standard Salesforce objects (Account, Asset, Case, Contact, Contract, Lead, Opportunity, Product and Solution). This can be easily expanded to more standard objects (e.g. Campaign) and custom objects by adding a lookup field to the SDoc_Relationship__c object. However, if a user wants to relate one S-Doc to multiple records of the same object type (e.g. one S-Docs Contract to two Salesforce Accounts), the user simply clicks on the New SDoc Relationship button from the S-Doc related list on the record and then relates it to the S-Doc. One additional SDoc_Relationship__c record is needed for each record of the same object type you want to relate to the same S-Doc.

You may also notice that the comments field and status field are conveniently located on the SDocs_Relationship object. S-Docs will automatically synchronize these fields among all relationships that point to the same generated document. For example, if you update the status of a Contract that is related to two different Accounts, the status will be consistent across all views.

The SDoc relationship junction object provides more power and flexibility in relating S-Docs to your Salesforce objects rather than just linking them directly.

The Additional Relationship Field

When a document is first generated, one S-Doc relationship record is automatically created and linked to the base object (the object that the template's Related To Type field is set to). In Salesforce Classic, you can also choose an additional object to automatically link documents to by setting the template's Additional Relationship field to the additional object.

The Additional Relationship field needs to be a related object field on the template's base object. For example, you can relate a document to an Opportunity and an Account (as an Additional Relationship) because there is an Account lookup field on the Opportunity record. Likewise, you can link an S-Docs to a Contact and the Account, since there is an Account lookup field on Contact. However, you could not, for example, automatically link an S-Docs to an Account (base object) and an Opportunity (Additional Relationship) because this is a one-to-many relationship.

Note: If you don't see this field, simply modify your page layout for the SDoc Template object and add the Additional Relationships field.

To edit the SDoc Template page layout in Salesforce Classic, navigate to an S-Docs template record and click Edit Layout.

Navigate to the Fields tab in the layout editor, find the Additional Relationships field, and drag it into the SDoc Template Detail section.

Tags:

Was this helpful?