Troubleshooting

Common Errors

And Resolutions

Troubleshoot Common Errors

Document Generation Errors

Errors that occur during the document generation process are commonly caused by two main issue types. Before proceeding, please ensure you have checked the following steps:

1. License Errors

Ensure that the user attempting to generate a document has S-Docs and (if applicable) S-Sign licenses assigned to their profile in your Production org. Also, be sure that you have a valid and up-to-date License Key template in your org.

2. Object/Field Permissions

  1. Ensure that the user attempting to generate a document has access to the objects/fields being queried by the document
  2. Ensure that the user attempting to generate a document has the S-Docs/S-Sign User permission set assigned to their profile

If the above steps do not resolve your issues, please browse our common errors and resolutions guide below.

Pro Tip: To save time, use your browser's search function to search for keywords from your error.

When I click the S-Docs button, I receive an error similar to the following.

Doclist parameter provided: {SDocTemplateID} does not exist OR The template’s “Related to Type” field not set to “{ObjectName}”

1. Open your S-Docs button (Setup > Object Manager > Base Object > Buttons, Links, and Actions > S-Docs Button > Edit).

  1. Remove any unnecessary spaces or non-visible characters in the URL
  2. Ensure that the template name/ID referenced with the doclist parameter corresponds to an existing template
  3. Ensure that the templates referenced with the doclist parameter have the same Related To Type object as your base object
  4. Ensure that the templates referenced with the doclist parameter are marked as Active

2. If you are encountering this error upon clicking the Save and Preview button in the template editor, make sure you’re working with a regular S-Docs template and not a Component template

User does not have permission to update field(s) on the following object:SDoc__c

This error may occur after upgrading S-Docs to a new version if you are not using the S-Docs permission sets. It can be resolved in one of the following ways:

  1. Add the S-Docs User or Administrator permission set to the User record(s)
  2. Update permissions for new fields in the SDoc object (which may have been added after upgrading to a new version) on the appropriate User profile(s)
  3. Ensure that the user is assigned an S-Docs license

Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: Object.FieldName

Ensure user attempting to generate the document has access to that particular field.

Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Parent ID: id value of incorrect type: {ID}: [ParentId]

This error can occur when a document tries to auto-create a Salesforce Attachment version of itself when the base object does not have Notes & Attachments.

  1. Open the template(s) that you are attempting to generate in the template editor
  2. Navigate to the Document Options tab
  3. In the Attachment and File Options section, uncheck the Create Salesforce Attachment and link to record checkbox
  4. Check the Create Salesforce File and link to record checkbox to auto-create Salesforce File copies of your document instead of Attachments

Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] Error is in expression '{!createAttachments}' in page sdoc:sdcreate3: (SDOC)

This error can occur for multiple different reasons. 

  1. The user generating the document does not have Create rights on the base object
  2. The user generating the document does not have full S-Docs permissions assigned. Assign the user the S-Docs Administrator or S-Docs User permission set
  3. A related list query in the template(s) is selecting an incorrect object. This may occur if a SOQL query is querying an object that the user does not have access to, or <listname> tags are incorrect (ensure there are no additional characters or numbers in the list name)

This error occurred when the flow tried to create records: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: SDOC.SDJobs: execution of AfterInsert caused by: SDOC.SDUtil.SDException: User does not have permission to update fields on the following object: SDJob__c Trigger.SDOC.SDJobs: line 252, column 1

This error can occur when users are generating documents through S-Doc Jobs. It can be resolved in one of the following ways:

  1. Assign the user the S-Docs Administrator or the S-Docs User permission set
  2. Edit the user’s profile and add Create/Edit permissions for new fields on the S-Doc Job object that may have been added when S-Docs was upgraded
  3. Ensure that the user has an S-Docs license assigned to them in your Production org

Failed to parse XML due to:

This error can occur when the template(s) contain syntax errors. Check the template source to ensure that all tags are defined/closed properly, and ensure there aren’t any missing characters anywhere. Common steps you can take are:

  1. Ensure all RENDER tags have matching ENDRENDER tags
  2. Ensure all nested RENDER tags are opened and closed properly (i.e. RENDER--RENDER1--RENDER2--ENDRENDER2--ENDRENDER1--ENDRENDER)
  3. Ensure that there are no “orphan” tags within render statements (i.e. a <span> tag that begins within a render statement and closes outside of the render statement)
  4. Ensure all related list tags are opened and closed properly (i.e. every <soql> tag has a </soql> tag)
  5. Ensure that you check tags in the template Header and Footer tabs too

Post-Document Generation Errors

After my document generates, the following occurs:

The document generates with source code displayed, such as image URLS or merge field names

This error occurs when the template(s) have syntax errors, commonly as a result of pasting source code into the WYSIWYG editor. Check the template source to ensure that the proper tags are used correctly (i.e. "<img src=", tags are opened and closed, tags don’t include extra characters), and ensure there aren’t any missing characters anywhere.

When I try to open a document that was generated from the S-Docs button, I receive the following error: Encountered premature end of XML: input contained no data

  1. Navigate to the template editor for the template(s) that trigger this error and click the Save & Preview button (if no Save & Preview button is present, navigate to the Advanced Options tab and paste a record ID into the Preview ID field). If the document does not generate properly, the template itself may be causing the error. If the document generates properly, move on to step 2
  2. Ensure that there is a Lookup Relationship field to the template's base object on the S-Doc Relationship object

My document generates, but my related list table is not populated with the records I expected it to be populated with

  1. Navigate to Setup > Developer Console > Query editor
  2. Input your related list queries into the query editor to verify whether or not the expected records are returned. This can help you identify if the problem originates within S-Docs or your org

Email Errors

When I try to email a document or send an e-signature request, I receive an error similar to the following:

ERROR: Email - SDEMAIL CONTROLLER LINE:1014 USER:UserName ERROR:Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, You must enter {{FIELD NAME(s)}} to save this record: []STACK:(SDOC)

This error can occur if S-Docs is unable to find a contact record tied to a recipient’s email address, and is further unable to create a temporary contact record for the recipient (commonly due to validation rules). To resolve this, please follow the steps in our email troubleshooting guide.

field 'fieldname' can not be sorted in a query call

This error can occur if Platform Encryption is not enabled for S-Docs in orgs that have Platform Encryption enabled.

  1. Navigate to the S-Docs Custom Settings entry (Setup > Custom Settings > SDocsSettings > Manage > Edit)
  2. Check the Platform Encryption Enabled checkbox

Mass Merge Errors

When I click the “COMBINE ALL” button during an S-Docs Mass Merge, I receive an error similar to the following:

Doclist parameter provided: {TemplateID} does not exist OR The templates “Related to Type” field not set to “user” SOQL:[SELECT t.Name, t.Language__c, t.Description__c, …]

  1. Navigate to the template editor for the template being used for this Mass Merge
  2. Navigate to the Document Options tab
  3. Under the Mass Merge Options section, uncheck the Only create a single summary document checkbox

Maximum redirects (100) exceeded

  1. Navigate to the template editor for the template being used for this Mass Merge
  2. Navigate to the Document Options tab
  3. Under the Mass Merge Options section, check the Do not archive the single consolidated document checkbox

Installation/Upgrade Errors

When installing or upgrading S-Docs or S-Sign, I receive an error similar to the following:

This app can't be upgraded. There are problems that prevent this package from being installed. Missing Organization Feature: EnhancedEmail / Quotes / Campaigns

The “Enhanced Email,” "Quotes," and "Campaigns" features must be enabled in your org.

  1. Navigate to Setup > Email > Enhanced Email
  2. Click Enable
  3. Navigate to Setup > Feature Settings > Sales > Quotes > Quote Settings
  4. Click Enable
  5. Navigate to Setup > Feature Settings > Marketing > Campaign Influence > Campaign Influence Settings
  6. Check the Enable button
  7. Depending on your org’s setup, you may need to add a campaign to the environment prior to the document generation process

When I open the template editor, I receive an “Attempt to de-reference a null object” error

This error can occur for multiple reasons.

  1. The template’s Related To Type object does not exist as a Related To Type picklist option in this org (this usually occurs when templates are imported from other orgs). Add the Related To Type object as a Related To Type picklist option
  2. There is an incorrectly configured lookup field to the Related To Type object on the S-Doc Relationship object. Ensure that you have correctly configured a Lookup field to the template’s Related To Type object on the S-Doc relationship object

S-Sign Errors

Note: We recently updated S-Sign to align with Salesforce's newest security recommendations. If you have not already, we recommend upgrading to S-Sign version 2.178+.

When using S-Sign, I receive an error similar to the following:

Error: SDCreate3 initialization error: The requested template was not able to be found. Either the doclist parameter provided: {'templateID'} does not exist, the template is not set to available to use, or the template's “Related To Type” field not set to “Object”

This error can occur when you are using custom S-Sign email notification templates that are not defined correctly in your S-Sign Notification Settings.

  1. Navigate to the template editor for your S-Sign PDF template(s)
  2. Navigate to the S-Sign Template Settings tab in the S-Sign panel, and find the S-Sign Notifications Settings section
  3. Remove any quotes or extra characters surrounding the template IDs that you’ve specified for your custom notification email templates

When trying to access the S-Sign Configuration or License page, I receive a “page not found” error

This error can occur for multiple different reasons.

  1. Ensure that your S-Sign Site has been activated
  2. Ensure that S-Sign has been installed in your org

The “Authorization Required” VisualForce page is displayed when S-Sign recipients click on the 'Click to Sign' link in a document

This error can occur for multiple reasons.

  1. Ensure you have correctly set up remote site settings as specified in the S-Sign installation guide
  2. Ensure your Connected App is configured properly, and that your Self-Signed Certificate is properly added to it
  3. Ensure you have created your S-Docs Custom Settings entry correctly
  4. Ensure that the S-Sign Site Guest User has the correct permission set assigned to it (navigate to App Launcher > S-Docs Setup > Go to S-Sign Setup Page > Click Set Site Info and Assign Permissions)
  5. Ensure that the S-Sign Internal User has the correct permission set assigned
  6. Ensure that the S-Sign Site URL input in the S-Sign Configuration Page matches the actual site URL.
    1. Navigate to Setup > User Interface > Sites and Domains > Sites
    2. Copy your S-Sign Site URL (if two URLS are displayed, ensure that you copy the secure URL)
    3. Navigate to the S-Sign Configuration page, and paste your S-Sign Site URL into the S-Sign Site URL field
    4. In the future, always ensure that both the Site Label and Site URL of your S-Sign Site matches the Site Label and Site URL shown on the S-Sign Configuration page
Additional Steps

If the above steps do not resolve your issue, you may be able to find out more information about the cause by enabling developer mode on your S-Sign Site.

  1. Navigate to the site detail page (Setup > User Interface > Sites and Domains > Sites)
  2. Click Preview as Admin to the left of the site's URL with developer mode enabled (this is commonly already enabled)
  3. Reload the original "Authorization Required" error page. It should state the type of error toward the bottom of the page in a yellow box if it is the result of an error in the Visualforce page

SectiSSException Line: 1276. Message: Error: document name has more than one period. Stack Trace:(SSign) Error is in expression '{!initCreateEnvelope}' in component in page ssign:sscreateenvelope:(SSign)on

This error can occur if you are attempting to send an e-signature request with a PDF that is not S-Sign enabled. This commonly happens when users select a correct S-Sign-enabled email template but not a correct S-Sign-enabled PDF.

  1. Ensure that the PDF that you have generated for your e-signature request is the correct S-Sign enabled PDF
  2. To enable a PDF for S-Sign, navigate to the template editor for that template, open the Advanced Options tab, and check the Enable S-Sign checkbox

S-Doc Job Errors

Before attempting to troubleshoot S-Doc Job errors, we recommend navigating to the template record(s) being used with the S-Doc Job and running a Save & Preview. If the document does not generate successfully, your issue likely has to do with the document template itself. If the document does generate successfully, move on to the troubleshooting information below.

Note: When auto-creating S-Docs through S-Doc Jobs, the Status field on the S-Doc Job record will indicate whether a Job has completed successfully or an error occurred. The following will give an explanation of what each Status field state means.

S-Doc Job Status Errors

  1. Completed: The documents have been created and (if relevant) emailed successfully
  2. Error: The job failed. Check the Status Details section for more information
  3. Error (Run As User Failed): The Run As User callout failed. Check the Status Details field for more information, and ensure you have configured the Run As User feature correctly
  4. 10: An error occurred in transition from the job creator user to the Run As User user. Ensure you have configured the Run As User feature correctly
  5. 35: An error occurred processing concurrent job splitters
  6. 40: An error occurred in part 1 of document generation (aka processing Runtime Prompts)
  7. 60: An error occurred in transition from part 1 of document generation to part 2 of document generation
  8. 80: An error occurred in part 2 of document generation, file/attachment creation, or emailing
  9. 90: The document(s) were generated successfully, but an error occurred during S-Sign processing

For errors 35, 40, 60, 80, 90, you can navigate to Setup > Apex Jobs and look for a failed Apex job. The error message on the Apex Job may provide additional information.