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

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": {
"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, //support removed in 14.0
"moveToButton": false,
"exportToPdfButton": false,
"exportToWordButton": false,
"exportToExcelButton": false,
"copyItemsToClipboardButton": false,
"importItemsToClipboardButton": false,
"addFolderButton": false,
"massEditButton": false,
"lineItemCommentsButton": false, //since version 14.0
"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:

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:

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.

{
  "name": "My Quote Type",
  "tabs": [
    {
      "icon": "file-info-alt",
      "name": "details",
      "type": "details",
      "buttons": {
        "submitButton": {
          "criteria": [
            {
              "value": "sales_managers, unity_test_users",
              "operator": "groupIncludes",
              "fieldName": "userGroupEdit",
              "_constructor": "AdvancedCriteria"
            }
          ],
          "operator": "and",
          "_constructor": "AdvancedCriteria"
        }
      },
      "translationKey": "dynamicTab_keyInformation"
    },
    {
      "icon": "red",
      "name": "workflow",
      "type": "workflow",
      "translationKey": "Workflow"
    },
    {
      "icon": "file-check-alt",
      "name": "actions",
      "type": "actions",
      "translationKey": "dynamicTab_actions"
    }
  ],
  "buttons": {
    "editButton": false,
    "deleteButton": false,
    "revokeButton": false,
    "submitButton": false,
    "duplicateButton": false
  }
}

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.

        "submitButton": {
          "criteria": [
            {
              "value": "ABC",
              "operator": "contains",
              "fieldName": "label"
            }
          ],
          "operator": "and"
        }