I've been doing a lot more SPE report implementations and noticed that the functionality of loading the ListView is dependent on whether the editor is using the Content Editor from Launchpad or the Content Editor from the Desktop.
Initial Configuration:
- Script calls
Show-ListView
without-Modal
parameter - Script calls
Close-Window
after callingShow-ListView
Desktop -> Content Editor
The ListView window will open once the Running Script window finishes. This adds another tab to the Sitecore task bar as expected.
Launchpad -> Content Editor
The Running Script window stays open and the ListView never opens.
It turns out that the Close-Window
call seems to be closing the actual ListView in the second scenario. Removing the Close-Window
call, however, requires the user to actually click close on the Running Script window. A minor inconvenience.
I also tried the -Modal
route, which works fine in conjunction with Close-Window
and loads the ListView just fine, however, in the first scenario, Desktop -> Content Editor, when opening an item in the ListView, the Content Editor window which opens with that item, loads behind the modal and the editor is forced to close the ListView modal in order to interact with it.
So my question is: Is there a native way to determine whether an editor is in the Desktop -> Content Editor
versus the Launchpad -> Content Editor
?