Home > Default > SharePoint Ribbon custom button "enablescript"

SharePoint Ribbon custom button "enablescript"

November 30Hits:0
I want to set  permission for  all selected items in library.
I 've added custom button   to ribbon.
My custom button{  find all selected items and redirect to "mypage.aspx?ids=12,25,45" } .
In them there is no problem....
if curentuser  does not have  full control  permissions  then  mybutton must be disable..
EnableScript not working:((
I 'have tried this and like this  examples.
I inserted alert('') between rows..
 and this row not working.
context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod), Function.createDelegate(this, this.onFailureMethod))


This enablescript  not working.
function ItemhasPermissions() 
 {    var buttonState= true;
      var selectedItems = SP.ListOperation.Selection.getSelectedItems();
      var count = CountDictionary(selectedItems);
      if (count > 0)
           var i;
           for (i in selectedItems)
if( !selectedItems[i].get_effectiveBasePermissions().has(SP.PermissionKind.editListItems))
return buttonState;

Read other 4 answers


Related Articles

  • SharePoint Ribbon custom button "enablescript"November 30

    Hi, I want to set  permission for  all selected items in library. I 've added custom button   to ribbon. My custom button{  find all selected items and redirect to "mypage.aspx?ids=12,25,45" } . In them there is no problem.... But.. if curentuse

  • Add additional Javascript code on OOTB sharepoint ribbon button.November 30

    Hello, We have SharePoint Ent and Project Server 2010 SP-2 environment. So the requirement is like that we have 1 OOTB "Save" ribbon button for Project Server 2010 Project Detail Pages. Which actually Saves and Publishes the project updates into

  • Adding custom button to Ribbon for custom list definitionOctober 11

    I'm trying to add a custom button to the ribbon, specifically for a custom list definition.  I have two custom list definitions, one for a document library (Type="11008") and one for a list (Type="10002").   I can use the following Cus

  • Ribbon disable buttonsNovember 30

    Hi all! I have custom solution for sharepoint with application pages and ribbons. So, I need to disable all ribbon buttons on all pages of my solution for a certain user groups.  I know how disable each ribbon button through EnableScript property. Bu

  • [SharePoint Ribbon] Add SplitButton needs Command="InsertImage"!!November 30

    I am adding SplitButton to the Media Group in the Interst Tab. However, if i supply Command="InsertImage", then the SplitButton works just fine, if i remove it the SplitButton gets disabled! The problem is that i have a forced item in the menu c

  • Get the Version history of a sharepoint 2013 Custom List itemOctober 11

    Hi All, I am having doubt to retrieve the field version information with the comments. For this field i am done like this 1.Creating a custom list 2.And enable versioning for the list 3.And add a field with field type 'Multiple Lines of Text' and in

  • Custom button, Outlook 2010November 30

    Just had Office 2010 installed on work computer (up from 2007). I had used a custom toolbar in Outlook 2007 and had made my own "buttons" to do repeated tasks (most the buttons linked to other network locations). 2007 Outlook you could make a cu

  • Add on custom button to ALV toolbar in std tcode ME51N, ME52N and ME53N.October 11

    Hi All, I have the requirement to add on the custom button to ALV toolbar in ITEM OVERVIEW for standard transaction ME51N, ME52N and ME53N. Does anyone know what enhancement point or user exit i should apply and how i can add on the custom button? Th

  • Custom button  on ALV report for Tcode FL10G ?October 11

    Hi All, I want to add custom button in the AVL report for FL10G transaction.  And then need to implement logic for that button (calling BAPI to create shipment for the selected records). For VL10G alv program GUI Status - STANDARD001  I think I can a

  • Adding Custom Breadcrumb for SharePoint 2013 Custom Master-Page With A Custom Separator.October 11

    Hi All, I have successfully converted an HTML file to a SharePoint 2013 Custom Master-Page with relevant style sheets. But when I used within the SharePoint site I could not find the breadcrumb. So I want to know how to do that? For that breadcrumb I

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 1.373 s.