Yes, loading a dossier directly into presentation mode in MicroStrategy web is possible. It is a bit of a work-around but it works well.
You probably already know that if a user has access to author or edit a dossier that the dossier will open in edit mode. The use case is simple; open a dossier in presentation mode, regardless authoring access.
Let's jump right into it. Watch the video below or read the details below.
Didn't watch the video? Okay, let's step through it below.
First, open your Dossier in and pause the data retrieval.
Next add an html container and add the customer code below
<script>
$(document).ready(function() {
if (mstrApp.isAppStatePresentation() == false) {
document.getElementsByClassName("item presentationMode")[0].click()
};
});
</script>
Now the next time you run your dossier, it will render directly into presentation mode!
The last thing to consider is that the dossier will always open in presentation mode. If you want to edit the dossier, you'll need to "open without data" to edit the dossier.
And that's it!
Thanks for checking out this blog post. If you found this post helpful please consider donating via PayPal. Any contribution is appreciated!
<script>
$(document).ready(function () {
const smallScreen = document.getElementsByClassName('item mb more');
if(mstrApp.isAppStatePresentation() == false){
if(smallScreen.length > 0 ){
document.getElementsByClassName("item mb more")[0].click()
document.getElementsByClassName("item presentationMode tg mstrmojo-ui-Menu-item")[0].click()
}else {
document.getElementsByClassName('item presentationMode')[0].click()
}
}
});
</script>
I am having some issues with this code. It actually works really well most of the time and it allows us to hide all of the edit functions and cubes from end users, which is exactly what we need. But we are finding that when a user runs the dashboard and is running it from their laptop screen, the code is ignored. If they then move the browser to a different screen or resize it, the page will refresh and render and the code passes. For some reason, the code isn't being triggered and opened when people are using laptops. This doesn't happen on all laptops, but we have at least 3 users that have the same issue. Do you…
Hi Omar,
The Script was running perfectly...but we udpated our Platform to MSTR 11.4 and now its not working anymore. Any idea's why, i'm assuming the script may need to be updated?
Hello Omar,
Using this script causes PDF export error.
"Renderer Engine Internal Problem. TypeError: Cannot read property 'click' of undefined"
Are you facing same issue? Any fix you can think of? Thanks a lot this helpful tricks.
Love this - exactly what I needed.