This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newSelection = new Tridion.Cme.Selection(); | |
var item = selection.getItem(0); // Get the first and only item | |
newSelection.addItem(item); | |
// Set Publish as allowed action to ensure that the Publish command is executed successfully. | |
newSelection.properties.allowedActions = $const.AllowedActions.Publish; | |
$commands.executeCommand("Publish",newSelection); |