Open Dashboard from Custom Tile

Is it possible to open a dashboard from a custom tile JS?

For example I have a button on my custom tile to launch a link.

let url = 'mydashboardlink';
window.open(url,"_blank");

I’ve tried _blank _self _parent with no luck. It seems to launch in a new session prompting for credentials. I just want it to open the referenced dashboard in same window.

Try this

1 Like

PERFECT. That works. Thank you.

Any chance anyone know of a way to open the dashboard up in a modal from a custom tile like you can with hero tiles? I’m guessing it could be a different action than navigate, just don’t know what it could be.

I don’t think it’s officially documented, but you can add a target='modal' to the payload. This must be used with the dashboardId rather than the route approach.

window.parent.postMessage({action:'navigate', target: 'modal', dashboardId: 'xxxxxx'}, "*")

And it will only work when the Custom Tile is viewed on an actual page IIRC, not on the Custom Tile Developer Tools preview.

That worked perfectly- thanks!

1 Like