JavaScript to Conditionally Enable a SharePoint Custom Ribbon using SharePoint2013 hosted app

EnabledScript="javascript:var EnableDisable=function(){
            this.clientContext=SP.ClientContext.get_current();
            this.selectedItems=SP.ListOperation.Selection.getSelectedItems(this.clientContext);
            var ci = CountDictionary(selectedItems);
            return (ci == 1);

            };EnableDisable();"

Hope this will helps you............

Comments

Popular posts from this blog

IRM and the Object Model

This content database has a schema version which is not supported in this farm

Activate and Deactivate Feature through PowerShell