S-Docs works great with your custom objects, but there are a few configuration steps you will need to take.

Below, you will find an overview of the configuration steps. Detailed step-by-step instructions on how to configure S-Docs with your custom object are available here: Configuring S-Docs with Custom Objects.

First, you will need to add your custom object to the picklist value “Related to Type” field in the SDOC Template object. When adding your object, be sure to use your object’s API name (e.g. myObject__c) as the new picklist value. This step is critical, as it allows S-Docs templates to be associated to your custom object.

Second, you need to create an S-Docs button and place it on your custom object’s detail page. We’ve found that a Detail Page button displayed in the “existing window without sidebar or header” works great.

You should create a button link using a URL similar to the following, but replacing ‘myObject__c’ with your Custom Object API name:

{!URLFOR('/apex/SDOC__SDCreate1', null,[id=myObject__c.Id, Object='myObject__c'])}

Lastly, this step allows generated S-Docs to be associated to your custom object and further allows you to place an S-Docs related list on your custom object’s detail page layout. You simply need to add a look-up field to the SDOC Relationship object that points to your custom object.

Note: The “Field Name” of this new lookup field must match the name of your object (e.g. myObject) without the “__c.”

Discussion: When using S-Docs with custom objects, the field template designer will automatically correct and append your related object fields with a “__r.” If you are comfortable creating your templates in the source code, be sure to use the standard Salesforce conventions and dot notation and be mindful of capitalization differences.

Top