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

Power Automate Flow Error: The ‘inputs.parameters’ of workflow operation of type ‘OpenApiConnection’ is not valid. The API operation does not allow writing a value for parameter ‘item/YOUR_COLUMN_NAME[0]/Id’. This parameter is read only.

Error The 'inputs.parameters' of workflow operation of type 'OpenApiConnection' is not valid. Error details: The API operation does not allow writing a value for parameter 'item/YOUR_COLUMN_NAME[0]/Id'. This parameter is read only. Motivo Este error aparece cuando al intentar hacer un update con valores dinámicos, uno de los campos es multiselect. Si tratamos de incluir el …

Sigue leyendo Power Automate Flow Error: The ‘inputs.parameters’ of workflow operation of type ‘OpenApiConnection’ is not valid. The API operation does not allow writing a value for parameter ‘item/YOUR_COLUMN_NAME[0]/Id’. This parameter is read only.

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

Error al guardar Infopath con llamadas REST (No sobreescribe el item)

Caso Tenemos un formulario Infopath con llamadas REST para obtener valores que utilizamos en Dropdowns. Al crear un nuevo item en la lista de SharePoint funciona. Al editar ese item no podemos guardarlo, nos genera un error. Test Si quitamos las llamadas REST, no se produce el error. Solución En Infopath vamos a las opciones …

Sigue leyendo Error al guardar Infopath con llamadas REST (No sobreescribe el item)

Obtener URL de la página de propiedades de un item

A través de esta función podemos obtener la URL para ver las propiedades de un item de una lista de SharePoint: public static string GetItemPropertiesURL(SPListItem item) { string web = item.Web.Url; string listID = item.ParentList.ID.ToString(); string contentType = item.ContentTypeId.ToString(); string itemID = item.ID.ToString(); string url = web + "/_layouts/listform.aspx?PageType=4&ListID={" + listID + "}&ID=" + itemID …

Sigue leyendo Obtener URL de la página de propiedades de un item

Detectar si se ha publicado un ítem en una lista con Event Receiver en SharePoint

Para poder detectar si se ha publicado un ítem en una lista no existe ningún evento del tipo "ItemPublished", pero si tenemos el evento "ItemCheckedIn" que nos avisará cada vez que se haga un CheckIn del elemento. Para saber si es una publicación o no podemos seguir estas indicaciones: Dentro del event receiver obtenemos el …

Sigue leyendo Detectar si se ha publicado un ítem en una lista con Event Receiver en SharePoint

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)

SharePoint 2013: Create JS File From HTML Display Template

When you create a custom Display Template and you deploy it, you can see the HTML uploaded, but you can't see its JS (created automatically in theory). Problem: You don't have the correspondent JS of your HTML Display Template Solution: 1. Access to your Site with SharePoint Designer 2. Go To: All Files -> _catalogs …

Sigue leyendo SharePoint 2013: Create JS File From HTML Display Template

Edit SharePoint Page By URL

If we couldn't acces to the menu item "Edit Page" for any reason and we want to edit that page (e.g. to remove some webpart that blocks our page) we've to add one parameter at the end: contents=1 Then, the URL would be like this: http://misyte.com/mysubsite/Pages/default.aspx?contents=1 By dong this we'll access to a standard SharePoint …

Sigue leyendo Edit SharePoint Page By URL