How to build the link to the Dashboard

Link to the dashboard can be built with two ways:

  • Combine relative or absolute URL of kanban page with necessary parameters

  • Use BUILDDASHBOARDLINK function

Use of kanban page URL

This way is suitable for URL/Navigate actions:

  • Add an "URL" type handler to necessary kanban element.

  • Set URL Value to relative or absolute path to kanban page or component:

    • Absolute path depends on server/organization you refer to.

    • Relative path may depend on page structure and will refer to the current server/organization; e.g., relative path can be like this: /lightning/cmp/c__KanBanComponent

  • Select which browser window the page will be opened in - the same (will go out of kanban) or new window/browser tab.

  • Add the necessary parameters.

Parameters for Kanban Component, used in this example, are:

  • c__style = some CSS styles, that will be applied to Kanban container;

  • c__variables = JSON with variables that should be passed to Kanban opened (optional);

  • c__kanbanId = ID of Kanban to open (may be set directly or via merge fields);

This way is good for places where link should be generated as HTML, instead of script-driven actions. For example, it is good to build links in email messages.

The BUILDDASHBOARDLINK function can be selected via merge field picker and should be called in this way:

BUILDDASHBOARDLINK(dashboard_id, variables, styles, as_html_tag_optional, text_optional)

The parameters are:

  • dashboard_id = ID of Kanban to open

  • variables = JSON with variables (in quotes '...') that should be passed to Kanban opened (optional; set to null, if not needed)

  • styles = some CSS styles, that will be applied to Kanban container, in quotes ('...')

  • as_html_tag_optional = true, false or null (that will be equal to false) - asks system if generate link as text, or as <a>...</a> HTML tag

  • text_optional = some text or null - sets the substitute text, that will be content (not "href") of <a> tag generated

Function should be wrapped with FORMULA[] operator and can be validated with formula editor.

Last updated