The following guide discusses how to use S-Docs in Lightning and how to edit a template in Lightning.
Adding an S-Docs Button to an Object's Page Layout in Lightning
If you have not already created an S-Docs button for your page layout, you will need to add a custom button. (Note that the S-Docs button comes prepackaged for many standard objects, such as Opportunities, Contacts, and Accounts.) To create a new button, you'll need to go to Setup>Customize>YourObjectNameHere>Buttons, Links & Actions.
You can then click on “New” and fill in the fields as in the following screenshot. You'll need to modify the button link per your object. In this case, our object is a Product (API name Product2), so we used:
Then, you'll have to add your new button to your page layout. In Lightning, you will be selecting the button from the "Salesforce1 & Lightning Actions" box in the toolbar and adding it to the Salesforce1 and Lightning Experience Actions" box in the page layout.
Click "Save", and you're all set! You can now generate S-Docs in Lightning.
Using S-Docs in Salesforce Lightning
To generate an S-Doc for a record, go to that record’s page and click the “S-Docs” button:
Then, select the templates you would like to use. Click “Next Step” to generate documents derived from the templates you selected:
Once you have generated your documents, you will see the “View Document(s)” page.
Please take note of the “Add” buttons under the “Comments” column, the pencil icon under the “Edit” column (if available), the “Email Selected Docs” button, and the document icons under the “View” column. You can click “Add” under the “Comments” column to add a comment to that S-Doc; this will appear later on in the S-Docs related list. Additionally, you can click one of the icons under the “View” column to view that document in a new tab:
Let’s return to the “View Document(s)” page. If “Allow Edit” is enabled for a particular template, you can click the pencil icon corresponding to that document to edit it after it’s been generated:
After you make your edits, you can click “Preview” to preview the final document, “Save” to save and return to the “View Document(s)” page, and “Close” to discard your changes and return to the “View Document(s)” page.
On the “View Document(s)” page, you can click “Email Selected Docs” to email your documents. Your documents will be included as attachments on an email. Here, you can edit the email fields as desired and click “Send” to send your email or “Cancel” to return to your record’s page.
Once you return to your record’s page, you will notice that the S-Docs you generated now appear in the S-Docs related list. You can click “View All” for a more in-depth look at your S-Docs’ details.
On the following page, you can click the document icon in the “View” column, the mail icon in the “Email” column, or the pencil icon in the “Edit” column to respectively view, email, or edit the corresponding document.
Now, going back to the record we generated S-Docs for, if we scroll down to the bottom of the page, we will see that the email we sent was recorded in the “Past Activity” section. Additionally, the Opportunity Summary was saved in the Notes & Attachments section, but not the Invoice. This is because “Auto-Create Attachment” is enabled for the Opportunity Summary template but not the Invoice template.
(If you’re a normal S-Docs user who is just generating documents and not editing templates, you can ignore the following note)
Note. In the S-Docs related list and “View Document(s)” page, the pencil icon will not show up for S-Docs that do not have “Allow Edit” enabled. Additionally, note that if the auto-create attachment box is not checked on a template, the documents created with that template in the S-Docs related list will be regenerated each time they are viewed, emailed, or edited. For example, if this box was not checked for an account summary template, and you opened an account summary document from 6 months ago, the document would be regenerated and the current account info would be displayed, rather than the account info from 6 months ago. These fields can be found on the record page for that particular S-Docs template, as shown in the upcoming section “Editing S-Docs Templates in Salesforce Lightning”:
Editing S-Docs Templates in Salesforce Lightning
Editing templates in Lightning works just the same as Classic. The only difference is getting there! To get there, go to the App Launcher and select the S-Docs app.
Then, click the “S-Docs Templates” tab. From here, you can select any template you’d like to edit.
Once you select a template, you can edit its fields or head over to the template editor to edit the contents of the template itself.
And there it is! Editing your template in Lightning works exactly the same as editing your template in Classic. If you wish to learn more about editing S-Docs templates, please see the S-Docs Developer's Guide.