Skip to main content
Skip table of contents

Use the Original Template Viewer

The original template viewer is a prebuilt page in Nimble Create that empowers staff to easily view a Nimble Create template for a particular record by clicking a button on a record page. However, it does not support email or bulk printing. For more functionality, use the advanced template viewer.

Prior to following these steps, you need to first create a Nimble Create template so you can tell the button which template to open. Learn more about creating a template.

Create a Custom Detail Page Button

These steps walk you through adding a button to a record page that launches a specific Nimble Create template. It renders the template using data for the record you are viewing.

For example, you could have a "View Event Logistics" button on the event record page that renders a template displaying all logistics for the event and its products. You can Author a Nimble Create Template to View Event Logistics to create a template that does exactly this.

  1. In Setup, select the Object Manager tab and then select the object where you want the button to appear.

  2. Select Buttons, Links and Actions and click New Button or Link.

  3. Populate the following fields:

    LabelEnter the text you want to have displayed as the button label.

    We recommend entering the same value as Label written in Pascal case.

    Learn more about Pascal case in Component Design Guidelines.

    DescriptionEnter a description that explains what the button does. It's helpful to specify which template is being used.
    Display TypeDetail Page Button

    Select the desired window behavior when the button is clicked. Generally Display in new window is selected.

    In Lightning Experience, it may only open in the same window, regardless of what you select.

    Content SourceURL
  4. In the large text box:

    1. Start by entering: /apex/NUTPL__TemplateViewer?templateId=
    2. Next, paste the record ID for your template record. This can be found by navigating to your template record and, in the URL, copy the 15 to 18 character record ID. For example: a2H0b0000016NS9EAM

    3. Next, enter: &param1=

    4. Next, enter the merge field that your template needs to render the template correctly.

      Generally this is the record ID for the object where you are displaying the button. For example, if you're adding this button to the event record page, you would generally enter the merge field for the event record ID, namely: {!NU__Event__c.Id}

      Alternatively, a more advanced option is displaying the button on a related object. For example, if you chose Product from the Object Manager, which is a child object of Event, and you have a template that selects from NU__Event__c, you would enter the event record ID using: {!NU__Product__c.NU__Event2Id__c}

      Use the Insert Field picklist above the large text box to select the ID field for the object, which ensures you are using the correct format.

    5. Optionally, if you want the template to render as a PDF, end with: &renderAs=pdf

      An example of the complete text in the large text box is: /apex/NUTPL__TemplateViewer?templateId=a2H0b0000016NS9EAM&param1={!NU__Event__c.Id}&renderAs=pdf

  5. Link Encoding can remain as Unicode (UTF-8).

  6. Click Save.

  7. Add your button to the page layout.

    Learn more about creating custom buttons and links (external), which also explains how to add them to page layouts.

    If your page layout's "Salesforce Mobile and Lightning Experience Actions" region is overridden, your button will not automatically appear in Lightning Experience or in Salesforce Mobile. In this case, you will also need to add the "Mobile & Lightning Action" that matches the label of the button you created. Learn more about Actions in Lightning Experience (external).

Use the Button to View the Rendered Template

Now that the button is created and added to the record page, you can use the button to view the rendered template.

  1. Go to a record that uses the page layout where you added the button.
  2. At the top of the record page, click the button that has the label you specified when creating the button.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.