Event Receiver en SharePoint (Teoría e información)

Tenemos 5 tipos de Event Receivers para programar en SharePoint: SPEmailEventReceiver (Para los emails) SPFeatureReceiver (Para las características) SPItemEventReceiver (Para los elementos de las listas/librerías) SPListEventReceiver (Para las listas/librerías) SPWebEventReceiver (Para los sites y site collections) Cada uno de ellos tienen unos métodos específicos que podemos implementar para realizar acciones: SPEmailEventReceiver 1.1. EmailReceived (Cuando un …

Sigue leyendo Event Receiver en SharePoint (Teoría e información)

Descargar XML con el esquema de una lista de SharePoint

Podemos exportar un XML que contenga todo el esquema de una de neustras listas de SharePoint a través de sus WebServices. Solo necesitamos tener el GUID de la lista (podemos verlo en la URL si entramos en la configuración de la lista). Para descargarlo tenemos que ir al site donde esta la lista y llamar …

Sigue leyendo Descargar XML con el esquema de una lista de SharePoint

SharePoint Drag & Drop: Limite de items para subir

SharePoint nos permite subir varios items al mismo tiempo usando Drag&Drop en sus librerías, basta con arrastrar nuestros ficheros del ordenador a la zona central de la lista.Esta acción tiene una limitación: Solo se pueden arrastrar al mismo tiempo 100 ficheros. Si pasamos de esa cifra al arrastrar nos saltará una ventana emergente indicándonos que …

Sigue leyendo SharePoint Drag & Drop: Limite de items para subir

Como ocultar el enlace «Contenidos del Sitio» del menú de SharePoint 2013

En el menú lateral izquierdo de nuestras páginas de SharePoint podemos ver que el último enlace es el de "Contenidos del Sitio". Este menú está distribuído en dos bloques: El primero contiene todos los enlaces del menú (sites, páginas...), el segundo contiene este enlace a los contenidos de nuestro site. Para ocultarlo, podemos aplicar un …

Sigue leyendo Como ocultar el enlace «Contenidos del Sitio» del menú de SharePoint 2013

¿Qué versión de SharePoint tengo instalada?

Para saber qué versión de SharePoint tenemos instalada en nuestro servidor tan solo debemos ir a:   1. Central Administration / Administración Central 2. Upgrade and Migration / Actualización y migración 3. Check product and path installation status / Verificar el estado de la instalación de productos y revisiones.   Aquí veremos al detalle lo …

Sigue leyendo ¿Qué versión de SharePoint tengo instalada?

Hide elements in Modal Dialog (SharePoint PopUp)

When a page is loaded in a Modal Dialog, its URL ends with "IsDlg=1", that means that it's being opened in a SharePoint PopUp. If you need to hide some elements when that happens (e.g. hide master page elements) you need to add a new class to these elements: Adding class "ms-dialogHidden" to an element …

Sigue leyendo Hide elements in Modal Dialog (SharePoint PopUp)

SharePoint 2013: Error occurred in deployment step ‘Add Solution’: An object in the SharePoint administrative framework, «SPSolutionLanguagePack

Error Error occurred in deployment step 'Add Solution': An object in the SharePoint administrative framework, "SPSolutionLanguagePack Name=0 Parent=SPSolution Name=XXXXXXXXXX.wsp", depends on other objects which do not exist. Ensure that all of the objects dependencies are created and retry this operation. Solution 1. Go to Services and Stop SharePoint Timer Service 2. Open C:ProgramDataMicrosoftSharePointConfig(GUID folder). 3. …

Sigue leyendo SharePoint 2013: Error occurred in deployment step ‘Add Solution’: An object in the SharePoint administrative framework, «SPSolutionLanguagePack

Delete SharePoint Page Programmatically

SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite site = new SPSite("YOURSITE")) { using (SPWeb web = site.OpenWeb()) { //Obtain the page PublishingPageCollection publishingPages = PublishingWeb.GetPublishingWeb(web).GetPublishingPages(); PublishingPage page = publishingPages.FirstOrDefault(f => f.Uri.AbsoluteUri == "YOURPAGE"); if (page != null) { //Allow modifications bool webAllow = web.AllowUnsafeUpdates; web.AllowUnsafeUpdates = true; SPFile file = page.ListItem.File; //Delete file.Delete(); //Restablish default permissions web.AllowUnsafeUpdates = …

Sigue leyendo Delete SharePoint Page Programmatically