Skip to content

Instantly share code, notes, and snippets.

View kunalshetye's full-sized avatar
👋
hi there!

Kunal Shetye kunalshetye

👋
hi there!
View GitHub Profile
@kunalshetye
kunalshetye / enable-publishing-snippet.js
Last active August 29, 2015 14:07
enable publishing on a selection
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);