How to Hide Quote Buttons

When you want to dynamically hide Quote action buttons for the users, you have the following options:

In a similar way you can hide buttons also in Agreements/Promotions, Compensation Plans and Rebate Agreements. The list of buttons that can be hidden is the same for all CLIC modules (Quoting, Agreements & Promotions, Rebates, Sales Compensation).

Calculation Logic

You can define buttons that will not be visible to users in Quote header logic. The header logic has to be run to hide the buttons.

To hide a button, use this code:

quoteProcessor.setRenderInfo("deleteButton","hide",true)

The list of all button names is available in description of the method setRenderInfo().

JSON Configuration

since 13.0

Which buttons to hide and when can be specified in the JSON definition of a Quote Type, therefore it is not dependent on a calculation logic execution. You can configure criteria when some Quote buttons shall be hidden to users, so that you offer them only those actions that make sense for them.

The criteria defined in the JSON configuration are evaluated dynamically, during each “refresh“, so only applicable choices are shown to the end users at all times. The configuration affects buttons visible on Detail page as well as contextual buttons on the List page.

The following buttons can be hidden in the JSON configuration (false = hidden):

"buttons": { "addButton": false, "attachmentsButton": false, "deleteMultipleButton": false, "moveToFolderButton": false, "markOfferAsLostButton": false, "markOfferAsLostWithReasonButton": false, "convertToDealButton": false, "reconvertToDealButton": false, "revokeButton": false, "createNewRevisionButton": false, "exportDetailButton": false, "duplicateButton": false, "deleteButton": false, "switchBackToEmberButton": false, "asyncPublishingButton": false, "moveToButton": false, "exportToPdfButton": false, "exportToWordButton": false, "exportToExcelButton": false, "copyItemsToClipboardButton": false, "importItemsToClipboardButton": false, "addFolderButton": false, "massEditButton": false, "submitButton": false, "saveButton": false, "calculateButton": false, "recalculateButton": false, "recalculateChangedButton": false, "calculateChangesOutputButton": false, "calculateChangesInputButton": false, "calculateChangesItemsButton": false, "startCreationWorkflowButton": false, "nextStepCreationWorkflowButton": false, "backStepCreationWorkflowButton": false, "finishCreationWorkflowButton": false, "finishCreationWorkflowAndSubmitButton": false, "withdrawButton": false, "emailingButton": false, "emailingAndSignatureButton": false, "createOpportunityButton": false, "assignOpportunityButton": false, "assignAccountButton": false, "showExportToExcelButton": false, "showExportToWordButton": false, "showExportToPdfButton": false, "editButton": false, "editLabelButton": false, "downloadAttachmentsButton": false, // on the Attachments tab "deleteAttachmentsButton": false, // on the Attachments tab "uploadAttachmentsButton": false, // on the Attachments tab "copyToClipboardButton": false, "importItemsFromClipboard": false, // on the Items tab "deleteItemsButton": false, // on the Items tab "duplicateItemsButton": false, // on the Items tab "moveItemsToFolderButton": false, // on the Items tab "addItemsButton": false, // on the Items tab "browseMenuItemsButton": false, // on the Items tab "summaryButton": false, "copyButton": false, "cancelButton": false, "viewWorkflowButton": false, "viewWorkflowHistoryButton": false },

Note:

  • The same buttons can be hidden this way in Agreement & Promotion Types and Compensation Types.

  • There is a difference between deleteButton and deleteMultipleButton. If you select two Quotes on the List page, one of which has the deleteButton enabled on the root level in the Quote Type and the other one has the deleteButton disabled, the Delete button will be displayed and you will be able to delete both Quotes by this action. The reason is that when you select multiple Quotes, the button that is rendered is the deleteMultipleButton one. Therefore if you want to make sure that users do not delete Quote that they shouldn't you must disable also the deleteMultipleButton.

  • On the list page you can have Quotes based on different Quote Types. Some of the Quote Types may use the JSON configuration to hide some context action buttons (Submit, Delete, etc.). When you select multiple Quotes where some have hidden buttons and some do not, the general rule is that when you select at least one Quote which has a specific contextual button hidden, then the button is hidden for the whole selection.

  • Hiding buttons on Dashboards and Configuration Wizards tabs is not supported.

Buttons can be hidden on tab or document (root) level. Criteria for dynamic display of buttons are defined in the same way as for tabs or steps, using hard-coded columns, attribute columns or attribute extensions.

See the following example:

{ "name": "My Quote Type", "tabs": [ { "icon": "file-info-alt", "name": "header", "type": "header", "buttons": { "submitButton": { "criteria": [ { "value": "sales_managers, sales_team", "operator": "groupIncludes", "fieldName": "userGroupEdit", "_constructor": "AdvancedCriteria" } ], "operator": "and", "_constructor": "AdvancedCriteria" } }, "translationKey": "dynamicTab_keyInformation" }, { "name": "items", "type": "items", "translationKey": "sfdc_quotes_tabs_items", }, { "icon": "calculator", "name": "customObject", "type": "customForms", "buttons": { "calculateButton": false, "recalculateButton": false }, "typeReference": "CFO_Embedded", "translationKey": "Custom Form" }, { "icon": "red", "name": "workflow", "type": "workflow", "translationKey": "Workflow" }, { "icon": "file-check-alt", "name": "actions", "type": "actions", "translationKey": "dynamicTab_actions" } ], "buttons": { // root level - buttons will be hidden both on list and detail page "deleteButton": false, "revokeButton": false, "submitButton": true, "duplicateButton": false, "editLabelButton": false } }

How button visibility is determined between root and tab settings:

  • Button visibility is defined on tab level → the button on this tab behaves according to this definition.

  • Button visibility is not defined on the tab level → the button behaves according to the root-level definition.
    If button visibility is not defined neither on the root level, the button is displayed because no definition means that the button is always visible.

  • Button visibility is defined on the root level → the button on the list page behaves according to this definition.

  • Button visibility is not defined on the root level → button is displayed on the list page.

Examples

In the following example, the Submit button’s visibility on the Details tab is determined by the filter. On the Actions and Workflow tabs, the Submit button is hidden because "submitButton": false is set on the root level. That also means that the Submit button is hidden on the List page as well.

The following example shows how you can control button visibility using a filter. The Submit button is displayed only in Quotes whose label contains the string ABC.

 

Found an issue in documentation? Write to us.

Â