Button Wizard

You can generate documents in Salesforce Lightning with Salesforce Classic Experience Buttons. Lightning users can use the button you create with the Button Wizard to generate documents from within Salesforce Lightning.

Access the Button Wizard

Use the Button Wizard to create buttons for custom objects, and use additional parameters to automate the user experience.

  1. Click the Nintex Admin tab.

    The Nintex Admin Home left navigation displays.

  1. Under Classic Experience Buttons, click Button Wizard.

Create a button with the Button Wizard

  1. From the Force.com app menu, select Nintex DocGen, and then click Nintex Admin.

  2. Under Classic Experience Buttons, click Button Wizard.

  3. Under Type, select one of the following:

    • Single Record Button

    • Mass DocGen Package via List View Button

    • Mass DocGen Package via Report Button

  1. In DocGen Package Starting Object, choose one of the following actions:

    1. Select one of the six standard objects.

    2. Select Other..., and then in Object Name, select an object.

  2. (Optional) Add any customization options. For more information, see Button Wizard field reference.

  3. Click Create Button. The New Button or Link page opens, with the code from the Button Wizard.

  4. In the New Button or Link Edit page, make any additional changes and click Save. A prompt reminds you to add the button to a page layout.

Add a button to page layouts on standard or custom objects

Add the button you created to the page layouts of the object for which it was created. If you already have a Salesforce Classic Experience generate documents button on the page layout, remove it.

Note: If you override the default Salesforce or Lightning actions on a page layout, Salesforce suppresses your button and displays your custom list of actions instead.

To add a button to a page layout on standard or custom objects:

  1. From Setup, take one of the following actions:

    1. If you're working with a standard object, type Page Layouts in the Quick Find box, then click the page layout of the standard object to which you want to add a button to generate documents.

      Example: If you want to add a button to the Account object, click Page Layouts under Accounts.

    2. If you're working with a custom object:

      1. Type Objects in the Quick Find box, then click Objects for a list of custom objects in your organization.

      2. Click the custom object you want to work with, and then click Page Layouts.

  2. On the page layout related list for the object you selected, click Edit next to the page layout to which you want to add the button.

  3. Click Mobile & Lightning Actions.

  4. In the list of available button elements, select Generate Documents or the button you just created and drag it to the Salesforce Mobile and Lightning Experience Actions.

  5. Click Save.

Button Wizard field reference

The Button Wizard creates buttons and other elements, like links and tabs, that you use to generate documents.

Although Nintex DocGen comes with built-in buttons for standard objects, you may need to create custom buttons. You might create a custom button to generate documents from a custom object or to customize what happens when the user clicks the button.

 

Section Field Description
(none) Create Button

Opens a new browser window with the Salesforce setup page for creating an element (button, link, or tab) specified in the wizard. The wizard supplies all the code required to create the element.

  Reset Options Resets the wizard's options to default values.
Code Code

The code window shows you the code for your element. As you select options for your element, the code in the window updates itself.

 

Default value: /apex/loop__looplus?&eid={!Opportunity.Id}

Basics

Button Name

This is the name of the button that users will click. Button Name only appears if you have Type set to create a button element.

 

This is a required field. Default value: Generate Documents.

 

Link Name

This is the name of the link that users will click. Link Name only appears if you have Type set to create a link element.

 

This is a required field. Default value: Generate Documents.

 

Tab Name

This is the name of the tab that users will click. Tab Name only appears if you have Type set to create a tab element.

 

This is a required field. Default value: Generate Documents.

 

Document Package Starting Object

This is the object from which your button or link will be available. For example, if you wanted to run a Document Package from the Opportunity object, you would select Opportunity here.

Tabs work different from buttons and links. For tabs, all the Document Packages for the object you select here will appear on the tab. For example, if you were creating a tab and selected Opportunity here, all the Document Packages based on the Opportunity object would appear on that tab.

For custom objects, select Other.

This is a required field.

Example: eid={!Object.Id}

Where

Object = the name of a standard or custom object

 

Object Name

Select the name of the custom object to be used as the starting object.

This is a required field. Object Name only appears if you select Other as the Document Package Starting Object.

 

Type

Select the type of element to create.

Possible options: 

  • Single Record Button

    A button to generate a document for a single record.

  • Single Record Link

    A link to generate a document for a single record.

  • Mass Document Package via List View Button

    A button to generate documents for multiple records on a list.

  • Mass Document Package via Report Button

    A button to generate documents for multiple records based on a Salesforce report.

  • Mass Document Package via Report Tab

    A tab to generate documents for multiple records based on a Salesforce report.

Mass elements enable you to generate documents for multiple records. You need to enable your edition to generate documents this way. For more information, see Mass Document Packages and Manage subscription options.

 

Return URL

The destination to send users after they generate documents.

Possible options:

  • Starting Object

    Returns the user to the Document Package Starting Object.

  • Any object associated with the Starting Object.

    A dynamically assembled list of all the objects associated with the starting object.

  • Other

    Opens a new box to the right of Return URL for a custom URL. Type the URL for the destination to return the user.

Example: retURL=/{!Object.Id}

Where

Object = the name of a standard or custom object

 

Account

Used to pass an account ID as a top level ID.

Example: accountID={!Object.Account.ID}

Where

Object = the name of the starting object

 

Case

Used to pass a case ID as a top level ID.

Example: caseID={!Objecdt.Case.ID}

Where

Object = the name of the starting object

 

Contact

Used to pass a contact ID as a top level ID.

Example: contactID={!Object.Contact.ID}

Where

Object = the name of the starting object

 

Contract

Used to pass a contract ID as a top level ID.

Example: contractID={!Object.Contract.ID}

Where

Object = the name of the starting object

 

Lead

Used to pass a lead ID as a top level ID.

Example: leadID={!Object.Lead.ID}

Where

Object = the name of the starting object

 

Opportunity

Used to pass an opportunity ID as a top level ID.

Example: opportunityID={!Object.Opportunity.ID}

Where

Object = the name of the starting object

Interface Options

Hide Header

Hides the breadcrumb and everything above it on the Visualforce page that is displayed after users click the button, link, or tab.

Example: header=false

 

Hide Sidebar

Hides the Document Package sidebar on the Visualforce page that appears after users click the button, link, or tab.

Example: sidebar=false

 

Hide Contact Selection

Hides contact selection on the Visualforce page that appears after users click the button, link, or tab.

Example: hidecontact=true

 

Hide Document Package Selection

Hides the Document Package selection box on the Visualforce page that appears after users click the button, link, or tab.

Example: hideddp=true

 

Document Package List Height

Type a value. This is the maximum number of Document Packages to show at one time on the Visualforce page that appears after users click the button, link, or tab. For example, if this were set to the default value of 10, and there were 11 Document Packages, the user would have to scroll the Document Package list.

Default value: 10

Example: ddpheight=value

Where

value = the maximum number of Document Packages to display in the list

 

Tab Style Class

Select a value from the list. Overrides the image and style on the Visualforce page that appears after users click this element. Not available for buttons or links for these objects: Accounts, Cases, Contacts, Contracts, Leads, Opportunities, and Quotes.

Example: tabclass=value

Where

value = the value for the tab you selected from the list

You typically use this option when your Starting Object is a custom object. View the source of a Visualforce page on the custom object and look for the body class that page uses to get this value.

 

Document Package Label

Type a value that will replace all instances of Document Package on the Visualforce page that appears after users click the button, link, or tab.

Example: ddplabel=value

Where

value = a string that replaces all instances of the string Document Package

 

In Service Cloud Console

Enables buttons and links for Service Cloud Console.

Not available for tab elements.

For more information, see Set up a Salesforce Console for Service.

Custom Options

Auto Run

Automatically runs the Document Package with the default selections.

Example: autorun=true

 

Attach Back

Selected if the Document Package has Allow Document Storage enabled on the Delivery Options related list.

Example: attach=true

 

Include Session ID

Specifies that the Session ID should be added to the button code, which is only necessary for using reports with Document Packages.

 

Example: sessionId={$Api.Session_ID}

Tip: If the button you're creating is for Salesforce Lightning, don't use this option. The sessionId parameter can cause problems in Lightning.

 

Attachment IDs

Type a value or a list of values separated by commas. Selects specified attachments. Use JavaScript or Apex to determine IDs. Only available for single record buttons or links.

Examples:

attachIds=value,value

attachids=all

Where

value = the ID of an attachment

all= keyword that specifies all attachments should be included

 

Parent IDs

Type a value or a list of values separated by commas. Attachments from the specified records IDs are made available to users to select. Use JavaScript or Apex to determine IDs. Only available for single record buttons or links.

Examples:

parentIds=value,value

Where

value = the ID of an attachment from an additional record

 

Filter

Select a value to filter the Document Package list on the Visualforce page that appears after users click the button, link, or tab. You can select one of the standard fields to filter on from the drop-down list, or you can select Other and an editable box appears for you to type a string. You can filter against the string entered here with a string entered on the Document Package Detail page, under Options, in Filter.

Filter works with Filter Type to specify filter behavior.

For an example of how to use a filter with a button, see Button Parameters.

Example: filter={!Object.Value}

Where

Object = Starting Object for this element

Value = Selected Filter

 

Filter Type

Select a value from the list. Modifies the application of Filter.

  • Contains

  • Does not contain

  • Does not equal

  • Ends with

  • Equals

  • Starts with

Equals is the default filter type.

Example: filtertype=value

Where

value= one of the Filter Type options

 

Document Package IDs

Type a value or a list of values separated by commas. Limits Document Packages on the Visualforce page that appears after users click the button, link, or tab.

Example: ddpIds=value,value

Where

value = the ID of a Document Package

Tip: Document Package Ids works best when you are not migrating Document Packages between organizations.

 

Delivery Option ID

Specifies a Delivery Option. Works best if used with a Filter or Document Package IDs.

Example: deploy=value

Where

value = a deployment ID or string that identifies the Delivery Option.

Tip: Document Package IDs work best when you are not migrating Document Packages between organizations.

 

Included Optional Docs

Type All, a value, or a list of values separated by commas (all or doc1, docZ). Used to specify or select all optional sections of a specific Document Package.

Examples:

included=value

included=all

Where

value= a specific document to include with the Document Package

all= the string all specifies all documents should be included with the Document Package