SharePoint HablaMoss 
El blog oficial del grupo de soporte de Microsoft SharePoint España

November, 2010

  • El equipo de soporte de SharePoint en España habla MOSS

    SharePoint 2010 - Como deshabilitar un boton del ribbon que viene por defecto

    • 2 Comments

    Hola a todos.

    Me gustaría relataros un sencillo how to sobre como deshabilitar un botón del ribbon de SP 2010 que viene por defecto. El ejemplo explica como borrar el boton conexión con outlook de librerías documentales y de listas de tareas.

     

    Creación de Proyecto SP 2010 en VS 2010

    1.       Arrancar Microsoft Visual Studio 2010.

    2.       Clickar en File, New, and luego clickar Project.

    3.       En Project Types, debajo de Visual Basic o C#, select Empty SharePoint Project en la sección Sharepoint 2010.

    4.       Escribir RemoveARibbonButton (o el nombre que queráis) como nombre de proyecto. Clickar OK.

    5.       En el SharePoint Customization Wizard, elegid Deploy as a sandboxed solution. Clickar Finish.

    Creación de feature (Caracteristica)

    6.       En Solution Explorer, click botón derecho en Features y elegid Add Feature.

    7.       Cambiar el titulo de la caracteristica a Remove a Ribbon Button (O el nombre que querais que aparezca en caracteristicas del sitio).

    8.       Click botón derecho en Feature1 en el Solution Explorer y elegid Rename. Escribid RemoveARibbonButton (o el que querais) como nuevo nombre.

    9.       Clcik boton derecho en el proecto RemoveARibbonButton (o el nombre que le hayas dado)  en el Solution Explorer y elegid Add y luego New Item.

    10.    En la ventana Add New Item, elegid la plantilla Empty Element. Introducid RemoveARibbonButton como nombre (o el nombre que le hayais dado a la Feature).

    11.    Abrid el archivo elements.xml y copiad el siguiente código

    <?xml version="1.0" encoding="utf-8"?>

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">

      <CustomAction

        Id="RemoveRibbonButton"

        Location="CommandUI.Ribbon"

        RegistrationType="List"

        RegistrationId="107">

        <CommandUIExtension>

          <CommandUIDefinitions>

            <CommandUIDefinition

              Location="Ribbon.List.Actions.ConnectToClient" />

          </CommandUIDefinitions>

        </CommandUIExtension>

      </CustomAction>

    </Elements> 

    El código anterior es válido para listas de task, por cada lista que queráis deshabilitar el botón podéis repetir este proceso anterior N veces (cambiando el registration ID) y tendréis N features que podréis habilitar/deshabilitar aisladamente

    También podrías generar todo en una misma feature/Característica replicando las custom actions en el fichero elements.xml.

    <?xml version="1.0" encoding="utf-8"?>

    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">

      <CustomAction

        Id="RemoveRibbonButton"

        Location="CommandUI.Ribbon"

        RegistrationType="List"

        RegistrationId="107">

        <CommandUIExtension>

          <CommandUIDefinitions>

            <CommandUIDefinition

              Location="Ribbon.List.Actions.ConnectToClient" />

          </CommandUIDefinitions>

        </CommandUIExtension>

      </CustomAction>

      <CustomAction

      Id="RemoveRibbonButton"

      Location="CommandUI.Ribbon"

      RegistrationType="List"

      RegistrationId="120">

        <CommandUIExtension>

          <CommandUIDefinitions>

            <CommandUIDefinition

              Location="Ribbon.List.Actions.ConnectToClient" />

          </CommandUIDefinitions>

        </CommandUIExtension>

      </CustomAction>

    </Elements>

    Este anterior elimina el botón en las librerías de documentos (ID=120) y en las listas de tasks (ID=107)

    Los valores de registration ids relacionados con las listas no están públicos. Pero la mejor manera de saber que registration id tiene una lista es hacer click derecho sobre la vista de la lista y seleccionar “view source code” y buscar por el string TemplateID. Si no también podéis ver los ids publicados en blogs no oficiales: (la mayoría de los template ID son iguales que en SharePoint 2007):

    http://techtrainingnotes.blogspot.com/2008/01/sharepoint-registrationid-list-template.html

    Y los nuevos templates añadidos para SharePoint 2010 son:

    http://techtrainingnotes.blogspot.com/2010/01/sharepoint-2010-registrationid-list.html

    12. Después de todo lo anterior puedes hacer debugging dejando el proyecto en modo debug y clickando F5. O si no puedes crear un proyecto reléase y hacer Click botón derecho sobre la solución y clickar en “Deploy”.

    13. Yendo a una libreria documental o una libreria de tareas observareís que el boton ha desaparecido. 

    Para más información me gustaría que leyerais también estos artículos:

                Otra manera de deshabilitar el botón connect to Outlook pero solo válida para librerías documentales:

    http://msdn.microsoft.com/es-es/library/ff408060.aspx

    Lista de las custom actions disponibles y personalizables en SharePoint 2010:

    http://msdn.microsoft.com/es-es/library/ee537543.aspx

    Muchas Gracias

    Un saludo.

    Héctor Calvarro Martín. SharePointDev. Microsoft Support Engineer for DEV EMEA 

  • El equipo de soporte de SharePoint en España habla MOSS

    Problema SharePoint 2010 October Cumulative Update: Detalles y Workaround

    • 0 Comments

    Hola a todos

    Se ha encontrado un problema en el SharePoint 2010 October Cumulative Update SE RECOMIENDA NO INSTALARLO. Si ya lo habeis hecho, en la siguiente página del Grupo de Producto se detalla el error y el workaround

    http://blogs.msdn.com/b/sharepoint/archive/2010/11/06/details-and-workaround.aspx

    Se esta investigando y se reeditarán los SharePoint 2010 October Cumulative Update sin el problema.

    Gracias.

    Un saludo.

    Héctor Calvarro Martín. SharePointDev. Microsoft Support Engineer for DEV EMEA

  • El equipo de soporte de SharePoint en España habla MOSS

    SharePoint 2010 October CU Disponibles de nuevo con el problema solucionado

    • 0 Comments

     

    Hola a todos.

    Desde el día 18 están disponibles de nuevo los paquetes del acumulativo de Octubre para SharePoint 2010 solucionando el problema descrito en el post http://blogs.technet.com/b/hablamoss/archive/2010/11/08/problema-sharepoint-2010-october-cumulative-update-detalles-y-workaround.aspx 

    Los paquetes actualizados son los siguientes y el número de build es 14.0.5128.5003

    MSF2010: 

    2394323 The full server package para Microsoft SharePoint Foundation 2010 
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;2394323

    Download link: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2394323&kbln=en-us

    SPS2010: 

    2394320 The full server package for SharePoint Server 2010 contiene también los fixes de MSF2010, así que necesitas sólo descargar este paquete si tienes SPS2010. 
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;2394320

    Download link: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2394320&kbln=en-us

    Project Server 2010: 

    Project server también contiene la actualización de SharePoint Server 2010 por lo cual necesitas descargar el Full Server package.

    2394322 The full server package for Project Server 2010 
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;2394322

    Download link: http://support.microsoft.com/hotfix/KBHotfix.aspx?kbnum=2394322&kbln=en-us

     

    Gracias.

    Un saludo.

    Héctor Calvarro Martín. SharePointDev. Microsoft Support Engineer for DEV EMEA  

Page 1 of 1 (3 items)