desktop launch custom screen
Is it possible to use a Menu Button with a command in the ActionName to launch a custom screen or is java script required for that.
Any properly instantiated menu item should be launchable with a menu button including menus created by Custom Commands. You can find the action names for all the menus by looking at the list of menu actions when adding a hot key in user preferences. It may even be useful to just copy that list to a spreadsheet. (Ideally the list would be accessible from the embedded designer, but we've got more work to do to support that).
You can add menus with JavaScript too. Here's a sample from the time and expense package of how to add a menu item from an initMenu script that allows itself to be accessible by menu buttons and hot keys:
// Define menu and action variables
var crmMenu = mainwindow.findChild("menu.crm.projects");
crmMenu.addSeparator();
var tesheetAction = crmMenu.addAction(qsTr("Time and Expense..."), mainwindow);
// The object name becomes the actionName property used by the menu button
tesheetAction.objectName = "pm.timesheets";
// This stores the privilege with the action so rescan of privileges will work
tesheetAction.setData("MaintainTimeExpense");
tesheetAction.enabled = privileges.value("MaintainTimeExpense");
// Define function(s)
function sOpenSheets()
{
var param = new Object;
var wind = toolbox.openWindow("tesheet", mainwindow);
wind.set(param);
}
// Connect Action(s)
tesheetAction.triggered.connect(sOpenSheets);
Thanks that should make customising the desktop easy
Note also that the strategy should be to save your desktop as a higher grade than zero so your changes won't be over written by a subsequent upgrade. The highest grade UI screen found by the application is the one that will be used. This is the same technique as used with reports.
We've actually already done this ourselves with our in-house implementation. ;)

