available since 16.0
Dynamic hiding of buttons in a Dashboard allows for a tailored user experience by specifying which buttons to hide and when in the JSON definition that is part of the Dashboard configuration. This configuration enables you to set criteria for when certain buttons should be hidden, ensuring that users are presented only with actions that are relevant to them.
The criteria defined in the JSON configuration are evaluated dynamically during each "refresh", ensuring that only applicable options are displayed to end users at all times. This configuration can hide both the header and portlet buttons.
The following buttons can be hidden in the JSON configuration (false = hidden):
{
"buttons": {
"portletContextualActionsButton": false,
"portletChartTooltipsButton": false,
"portletEditChartButton": false,
"portletExportButton": false,
"portletExportXLSButton": false,
"portletExportPNGButton": false,
"portletExportJPGButton": false,
"portletExportSVGButton": false,
"portletExportPDFButton": false,
"portletRemoveButton": false,
"portletAIButton": false,
"portletMoveToFolderButton": false,
"dashboardCreateButton": false,
"aiExploreButton": false,
"addPortletButton": false,
"dashboardExportButton": false,
"reopenActionButton": false,
"markDoneActionButton": false,
"blockActionButton": false,
"postponeActionButton": false,
"rejectActionButton": false,
"addActionButton": false,
"editActionButton": false,
"viewActionButton": false,
"deleteActionButton": false
}
}
If the dashboard is embedded in another document (Quote, Custom Form, etc.), you can hide buttons in the JSON definition of the document. In the following example, the 'Add Portlet' button is hidden on the Dashboard tab of a Quote:
{
"name": "default",
"tabs": [
{
"name": "items",
"type": "items",
"translationKey": "sfdc_quotes_tabs_items"
},
{
"name": "header",
"type": "header",
"translationKey": "sfdc_quotes_tabs_header"
},
{
"name": "dashboard",
"type": "dashboard",
"buttons": {
"addPortletButton": false
},
"translationKey": "dynamicTab_dashboard"
}
]
}