Parameters For Apex Buttons & Calls to Create S-Docs

Introduction

The following parameters can be appended to an Apex button or to the end of an S-Doc creation call.

Note: These parameters are case-sensitive.

Template Editor Parameters

Parameter Values Function
showTabN= False to hide specific template editor tabs

True to only show specific template editor tabs

Example:

showTab4='false'

This will hide the Page Settings tab.

showTab1='true'

This will only display the Template Body tab.

This parameter allows you to hide specific tabs in the template editor. For more information, please view the article Hide Template Editor Tabs.
rpRichText= True by default, false to disable rich text fields. For templates that have a very large number of runtime prompts, this will replace all rich text editors for runtime prompts with regular text areas to decrease loading times.

Note that this parameter needs to be added to the URL for the S-Docs template editor button, and not the S-Docs button.

Note: If you are using S-Docs 4.455+, this parameter's functionality can now be set in the Document Options tab of the template editor.
showCVJSON= True to enable, false to disable (disabled by default).

Example:
{
"Checkbox__c": "true",
"Date_Created__c": "{{!Opportunity.CloseDate}}",
"Type_Picklist__c": "Three",
"Type_Text__c": "{{!Opportunity.Name}}",
"Decimal_Value__c": "12.34",
"Integer_Value__c": "1234"
}

This parameter allows you to preset Content Version file attributes in the Template Editor. It will add the Content Version Field Assignment JSON field to the Document Options tab in the Template Editor. You can input a JSON map of Content Version field API names and values into this field, as shown in the example to the left.

Note: If you are using S-Docs 4.455+, this parameter's functionality can now be set in the Document Options tab of the template editor.

Template Selection Parameters

Parameter Values Function
categoryfilter= Comma-delimited list of values from the S-Doc Template category field.

Example: categoryfilter='Contract'

This will only display templates with the Category field set to the specified categories after a user clicks the S-Docs button.
searchfilter= Comma-delimited list of values from S-Doc Template Name or Description fields.

Example: searchfilter='Discount'

This will only display templates with the specified values present in the Name or Description field after a user clicks the S-Docs button.
additionalFields= Comma-delimited list of S-Docs Template field API names.
Example: AdditionalFields='Industry__c'
You can also add preset values to filter these additional fields.
Example: AdditionalFields='Industry__c:Textiles'
Allows you to display fields from the S-Docs Template detail page as custom columns on the "Select template(s)" page that is displayed after a user clicks the S-Docs button. This parameter also allows you to set custom filters for those columns.

For example, say you have two custom fields on your template, Region__c and Industry__c, and you've added AdditionalFields='Region__c,Industry__c' to your S-Docs button. These fields will then show up as columns on the template list view displayed on the "Select template(s)" page. Additionally, search fields will show up for these fields on the "Select template(s)" page so the user can apply a filter/search on one or both of these fields in order to see only the templates that match the supplied criteria.

AFIncludeNulls= True to enable, False to disable. This parameter is used in conjunction with the additionalFields= parameter. When set to true, this parameter will include fields with null values.
AFPicklist= True by default, false to hide the picklist (choosing false will enable the intended functionality of this parameter). This parameter will hide the picklist that is shown on the template selection page when using the AdditionalFields= parameter, making it so that users cannot edit filters that have been applied.
showHeader= True to enable, False to disable. This will hide the header on the S-Docs template selection and document creation pages.
sidebar= True to enable, False to disable. This will hide the sidebar on the S-Docs template selection and document creation pages.

Document Generation & Email Parameters

Parameter Values Function
prepemail= 1 to enable, 0 to disable (disabled by default). This will create but not automatically send an email.
sendemail= 1 to enable, 0 to disable (disabled by default). This will create and automatically send an email.
doclist= Comma delimited list of S-Docs template names or IDs.
Example: doclist='Template1,Template2'
This will automatically generate the documents specified in the parameter and route the user to the "Generated Documents" screen. It's also used for specifying which documents to generate when using S-Docs with the Salesforce Process Builder.
oneclick= True to enable, False to disable (enabled by default). This parameter modulates the doclist parameter; if it is set to "false," the doclist parameter will not automatically generate documents, but will simply route the user to the template selection page with the documents pre-selected.
SetOrgWide= Org-wide email address.

Examples:

SetOrgWide='accounting@company.com'

SetOrgWide=Opportunity.From_Address__c

This parameter will automatically set the default email From address to the specified org-wide address when users arrive at the S-Docs email page.
autodownload= True to enable, False to disable (disabled by default). This parameter will automatically download the document(s) to the user's device after generation is complete. Note that this parameter is not supported for DOCX, PPTX, or XLSX documents.
previewFirst= True to enable, False to disable (disabled by default). This parameter will prevent attachments, files, and S-Doc Relationships from being created when a document is generated. Upon generation, a Generate and Save button will replace the Email Selected Docs button. Clicking this button will create the attachments, files, and S-Doc Relationship. Users can also click Cancel Preview to return to the base record.
aid= Comma delimited list of IDs for attachments on a record’s “Attachments” related list. For attaching attachments to your email.
fid= Comma delimited list of IDs for files from your "Files" tab. For attaching files to your email.
did= Comma delimited list of IDs for documents from your “Documents” tab. For attaching documents to your email.
autoopen= To open in the same browser tab pass a binary value.
Example: autoopen='1'
A value of 1 enables this setting, whereas a value of 0 or passing no value disables it. To open in a new browser tab use the value newtab.
Example: autoopen='newtab'
Note that your popup blocker must be disabled for Salesforce in order for the newtab value to function properly.
This will automatically open the document after generation. Note that this shouldn’t be used on calls to create S-Docs via automation.
useExistingNoContactRecord= True to enable, False to disable (disabled by default). By default, when an email is sent by S-Docs to an address that isn’t listed under a contact in your org, S-Docs creates and immediately deletes a contact record called “No Contact Record.” If you have validation rules in place that require multiple contact fields be completed, you can create your own No Contact Record and use this parameter. The record should have a last name of No Contact Record (first name not required) and an email address of this.email@is.invalid
attParentId2= A single Salesforce record ID
Example: attParentId2='a0C4N00003LcItc'
When you click Attach or Remove Files on the S-Docs email page, the menu will show all attachments and files of the base record used to generate the documents by default. When you use this parameter and specify another record ID, this page will also show all of the attachments and files of that additional record. Note that additional attachments are not supported for S-Sign email templates at this time.
attParentId2FilterAtt= SOQL Query filter for the list of attachments related to the attparentID2 record. Allows you to set filter criteria for which attachments are displayed from the record  specified by the attParentId2 parameter.
attParentId2FilterFile= SOQL Query filter list of files related to the attparentID2 record. Allows you to set filter criteria for which files are displayed from the record specified by the attParentId2 parameter.
customAddFilesButton= See Customize Email Attachment Selection. Adds a custom button to the S-Docs Email page that calls your custom Apex class to query Salesforce File IDs to attach to the outbound email. See our article Customize Email Attachment Selection for information about how to set up and customize this parameter.
hideContactLookup= True to enable, False to disable (disabled by default). Allows you to hide the Contact Lookup window that appears on the S-Docs Email Page.
generatedFields= Comma delimited list of Salesforce field API names.
Example: generatedFields='Base_Object_Type__c,Name' would show the related list object and the template name in columns on the generated document page table.
Allows you to display fields from your template(s) as custom columns on the "Generated Documents" page that is displayed after a user generates their documents (after users select their template(s) and click "Next Step").This parameter is similar to the additionalFields parameter, however fields specified with that parameter appear on the select templates page, while fields specified with this parameter appear on the generated documents page.
autoBox= 1 to enable, 0 to disable (disabled by default). This parameter will automatically upload generated documents to Box if you have enabled S-Docs Box Integration.
UIlanguage= Admin-defined language name (see article: Translate the S-Docs UI). This will translate the user interface of S-Docs (see article: Translate the S-Docs UI).
GenAtEmail= True to enable, False to disable (disabled by default). This parameter adds a button to the S-Docs email page that allows you to generate & attach a new document to your current email.

Note: This parameter is added by default when users click the Email icon in the S-Docs related list to email a previously generated document.
language= Salesforce Language ID. This parameter will allow merge fields and field labels to be translated (provided that the translate keyword is used in the merge fields in the template). (See article: Translate Merge Fields and Field Labels)
replyToMostRecentEmail= True to enable, False to disable. This will include the most recent email’s text in the body email on the S-Docs email page.
useAttNameForDocName= True to enable, False to disable. Will display the attachment name instead of the document name on the generated documents page.
quickPickJunctions= Contact Quick Pick picklist.
Example (single junction):
quickPickJunctions='Contact_Junction_Obj_API_Name,
Base_Obj_Lookup_API_Name,
Contact_Lookup_API_Name'
Example (multiple junctions):
quickPickJunctions='Contact_Junction_1__c,
Opportunity_1__c,Contact_1__c;
Contact_Junction_2__c,Opportunity_2__c,Contact_2__c'
This is used to notify the S-Docs email page of a junction object between Contact and the base object that a document was generated from. It adds the junction object’s contacts to the email contact quickpick list.
customRedirect= Absolute URL.

Example:

customRedirect='https://sdocshelp-dev-ed.lightning.force.com/lightning/r/Lead/00Q4P00001HKdF9UAL/view'

This will redirect users to a custom page in your org after their documents finish generating. The IDs for the documents that generated with this parameter will be visible in the URL after "sdocsIds="
editorWidth= String (number of pixels).

Example: editorWidth='500'

Adjusts the width of the rich text editor on the S-Docs email page. It is useful mainly if you’re using Salesforce on a phone or tablet.
prefillRTP=

Runtime Prompt merge field names paired with values (MergeField,Value)

Example: If you want to prefill 2 Runtime Prompts whose merge fields are named "patientAge" and "patientBirthdate," your syntax would look something like:

prefillRTP='patientAge,23;patientBirthdate,1997-06-04'

This parameter allows you to prefill Runtime Prompt answers, which can be useful for templates that need to be used with one-click automation and also contain Runtime Prompts.

Note: Date type Runtime Prompts should be formatted as yyyy-MM-dd

Note 2: Checkbox type Runtime Prompts can include multiple values in a comma-delimited list

Note 3: If all Runtime Prompts are filled in using this parameter, the Runtime Prompt interface will be skipped during document generation

addToEmail=

 True to enable, False to disable (disabled by default).

This parameter is used in conjunction with the addToEmail related list column attribute to add email addresses merged through related list columns as document email recipients

Live Edit Parameters

Parameter Values Function
SDEditSameTab= True to enable, False to disable (false by default) If a template has the Live Edit feature enabled, this will cause a pencil icon to appear next to the document once a user generates it (e.g. after clicking Next Step during the document generation process). By default, clicking this pencil will open the Allow Edit live editor in a new tab.

This parameter causes the Live Edit live editor to open in the same tab as the "View Documents" page. This parameter also replaces the Close button in the Live Edit live editor with a Return to Record button.

customSave= Override to replace the current Save button, newbutton to add a new Save button.

Example: customSave='Override'

This will modify the Save button on the S-Docs Allow Edit live editor (which allows users to edit a document after it has been generated).Override will replace the Save button with a button that saves the document and redirects the user to a specified URL.

Newbutton will retain the original Save button and add a new button that saves the edited document and redirects the user to a specified URL.

Both of these need to be enabled in Custom Settings > SDocsSettings and added to the URL in specified SDEdit Custom URL.

returntorecord= True to enable, False to disable (false by default) This can be added to the SDEdit Custom URL (In Custom Settings > SDocsSettings). It will cause the Close button on the Live Edit page to redirect the user to the base record in the same tab.
color= Color hex number without the pound (#) symbol.

Example: color=FFFFFF

This can be added to the SDEdit Custom URL (In Custom Settings > SDocsSettings) to change the button text color.
backgroundColor= Color hex number without the pound (#) symbol.

Example: color=FFFFFF

This can be added to the SDEdit Custom URL (In Custom Settings > SDocsSettings) to change the button background color.

S-Sign Parameters

Parameter Values Function
autoSSign= 1 to enable, 0 to disable (disabled by default). This will generate an S-Sign e-signature request and navigate the user to the Email page. For sign in-person use cases, the signing experience will open after generation.
showSSignInPerson= True to enable, False to disable (enabled by default). Allows you to hide the E-Sign Documents In Person button.
showSSignPrintDocuments= True to enable, False to disable (disabled by default). This will add a Print button to the document signing interface that allows end users to print the document(s) requested for e-signature.

Warning
After printing, the following occurs:

  • The e-signature process ends (the document is not routed to subsequent signers)
  • The S-Sign Envelope is not updated
  • Inputs provided by previous signers are not displayed on the printed document
  • The audit trail is not provided on the printed document

We recommend only enabling this feature for single-signer use cases. After confirming with the signer that the document has been printed, we also recommend that the requester voids the envelope in Salesforce.


Note: This button can also be enabled in the S-Sign Template Settings in the template editor.
ssignParams= Language that is supported by a downloaded translation template (see article: Translate the S-Sign UI). This will translate the user interface of S-Sign (see article: Translate the S-Sign UI).

General Parameters

Parameter Values Function
lightningnav= True to enable, False to disable (disabled by default). If page navigation is not working properly when creating documents in Salesforce Lightning or Mobile, this parameter will fix most navigation issues.

Tags:

Was this helpful?