Filtrar Búsqueda de SharePoint por Site Pages (Web Page Library Item)

Podemos filtrar nuestra búsqueda de SharePoint por items del tipo Site Page utilizando el filtro de Content Class y el valor STS_ListItem_WebPageLibrary. Tan solo debemos incluir en nuestra query (o query template): contentclass:STS_ListItem_WebPageLibrary No hay una lista "oficial" por parte de Microsoft para los Content Class pero podéis encontrarla aquí: https://lodesharepoint.com/lista-de-content-class-en-sharepoint

Lista de Content Class en SharePoint

No hay una lista “oficial” por parte de Microsoft para los Content Class pero aquí tenéis los STS disponibles (Ejemplo: contentclass:STS_Site): STS_Site –  Site CollectionSTS_Web  –  Site (Web)STS_List_850  –  Page LibrarySTS_ListItem_850  –  PageSTS_List_DocumentLibrary  –  Document LibrarySTS_ListItem_DocumentLibrary  –  Document Library ItemsSTS_List  –  Custom ListSTS_ListItem  –  Custom List ItemSTS_List_Links  –  Links ListSTS_ListItem_Links  –  Links List ItemSTS_List_Tasks  – …

Sigue leyendo Lista de Content Class en SharePoint

SharePoint: Tipos de Lista (ID + Nombre)

100   Generic list101   Document library102   Survey103   Links list104   Announcements list105   Contacts list106   Events list107   Tasks list108   Discussion board109   Picture library110   Data sources111   Site template gallery112   User Information list113   Web Part gallery114   List template gallery115   XML Form library116   Master pages gallery117   No-Code Workflows118   Custom Workflow Process119   Wiki Page library120   Custom grid for a list130   Data Connection library140   Workflow History150   Gantt Tasks list200   Meeting Series list201   Meeting Agenda list202   Meeting Attendees list204   Meeting Decisions list207   Meeting Objectives list210   Meeting text box211   Meeting Things To Bring list212   Meeting Workspace Pages …

Sigue leyendo SharePoint: Tipos de Lista (ID + Nombre)

Error: The file PS1 is not digitally signed. You cannot run this script on the current system.

Error: .\FILE.ps1 : File C:\FILE.ps1 cannot be loaded. The file C:\FILE.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170. Fix (Bypass): Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass [Bypass policies] Nothing is blocked and there are no warnings …

Sigue leyendo Error: The file PS1 is not digitally signed. You cannot run this script on the current system.

SharePoint – Mostrar Descripción de un Campo en el Layout

Podemos mostrar la description Out-of-the-Box de un campo en un layout con dos lineas: Primero, debemos asegurarnos de tener registrado el namespace de WebControls en nuestro Layout: <!--SPM:<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>--> Y segundo, debemos incluir la siguiente linea por cada campo que queramos: <!--MS:<SharePoint:FieldProperty FieldName="FIELD_NAME" PropertyName="Description" runat="server">--><!--ME:</SharePoint:FieldProperty>-->

SharePoint Online – Obtener User Properties en Page Layout sin llamadas Asíncronas

Podemos obtener las propiedades por medio de un control llamado ProfileProperty. 1 Registrar el namespace <!--SPM:<%@ Register Tagprefix="PortalWebControls" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>--> 2 Cargar el control <!--SPM:<PortalWebControls:ProfilePropertyLoader runat="server" />--> 3 Añadir una linea por cada propiedad (Mantenemos la clase Out-of-the-Box ms-hide para ocultarlas) <!--SPM:<PortalWebControls:ProfilePropertyValue CssClass="ms-hide" PropertyName="MY_PROPERTY_NAME" ApplyFormatting="False" runat="server" ShowPrivate="True" PrefixBrIfNotEmpty="False" />--> Nota: En …

Sigue leyendo SharePoint Online – Obtener User Properties en Page Layout sin llamadas Asíncronas

Crear Item en Lista de SharePoint usando CSOM

A través de una aplicación de consola podemos crear items en una lista utilizando la librería cliente de SharePoint: string siteUrl = "https://mytenant.sharepoint.com/sites/mysite"; using (ClientContext clientContext = new ClientContext(siteUrl)) { SecureString passWord = new SecureString(); foreach (char c in "myPassword".ToCharArray()) passWord.AppendChar(c); clientContext.Credentials = new SharePointOnlineCredentials("myMail@myDomain.com", passWord); List oList = clientContext.Web.Lists.GetByTitle("myList"); ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation(); …

Sigue leyendo Crear Item en Lista de SharePoint usando CSOM

Obtener Objeto Usuario de SharePoint utilizando CSOM

Podemos obtener un usuario de SharePoint con el metodo EnsureUser. Caso práctico: Obtener usuario para crear un nuevo item en una lista donde uno de los campos a rellenar es del tipo User. Dentro del contexto de SharePoint podemos obtenerlo de este modo: Web mySite = clientContext.Site.OpenWeb("mySiteUrl"); clientContext.Load(mySite); clientContext.ExecuteQuery(); User myUser= pocSite.EnsureUser("i:0#.f|membership|myUser@myDomain.com"); clientContext.Load(myUser); clientContext.ExecuteQuery(); Ejemplo …

Sigue leyendo Obtener Objeto Usuario de SharePoint utilizando CSOM

Añadir Tipos de Fuente en la Ribbon de SharePoint

Se pueden añadir estilos personalizados en el editor de texto de la ribbon de sharepoint mediante el uso exclusivo de CSS: Crear un nuevo elemento p.ms-rteElement-MyElement1 { -ms-name: 'My Custom Element'; /* CSS Styles Here */ } El primer selector de css es el elemento que vamos a usar (en este caso, un párrafo "p", …

Sigue leyendo Añadir Tipos de Fuente en la Ribbon de SharePoint