Hide Template Editor Tabs

Introduction

The S-Docs template editor tabs provide access to the template editor's different functions. You can hide any of these tabs by adding apex parameters to your template editor button URL.

Edit The Template Editor Button

From the setup menu, navigate to the Object Manager and find the SDoc Template object.

Navigate to the Buttons, Links, and Actions tab. The default Template Editor button is managed and cannot be edited, so click New Button or Link to create a new Template Editor button if you haven't already. Note that you will have to add this new button to your SDoc Template page layout once you save it.

Enter the following values.

Label: Choose a button label (we recommend something similar to Template Editor)
Name: This value auto-populates
Display Type: Detail Page Button
Behavior: Display in existing window without sidebar or header
Content Source: URL
URL:

{!URLFOR('/apex/SDOC__SDTemplateEditor', null,[Id=SDOC__SDTemplate__c.Id,Field='Template_XML__c'])}

After inserting the base URL, append one or more of the parameters detailed in the next section to hide template editor tabs.

Hide Template Editor Tabs with Apex Parameters

Add one or more of the following apex parameters to your template editor button URL. Use the following syntax to hide individual tabs:

showTabN='false'
Parameter Corresponding Tab
showTab1= Template Body
showTab2= Header
showTab3= Footer
showTab4= Page Settings
showTab5= Document Options
showTab6= Email Settings
showTab7= Create Salesforce Task
showTab8= Runtime Prompts
showTab9= Advanced Options

Note: You can also use the following syntax to display only one or a few tabs:

showTabN='true'

Only the tabs specified will be displayed.

Examples

#1

Template Editor Button URL:

{!URLFOR('/apex/SDOC__SDTemplateEditor', null,[Id=SDOC__SDTemplate__c.Id,Field='Template_XML__c', showTab6='false'])}

Template Editor:

Note that the Email Settings tab is hidden.

#2

Template Editor Button URL

{!URLFOR('/apex/SDOC__SDTemplateEditor', null,[Id=SDOC__SDTemplate__c.Id,Field='Template_XML__c', showTab1='true', showTab9='true'])}

Template Editor:

Note that only the Template Body and Advanced Options tabs are shown.

Tags: , ,

Was this helpful?