Subir Fichero en SharePoint Online desde SPFx via JSOM (React + Typescript)

Podemos subir un fichero (Hasta un máximo de 2Mb) desde nuestro Client WebPart en SharePoint Framework a través de JSOM. Para ello debemos añadir un fichero, procesarlo e incluirlo en la librería, siguiendo estos pasos:   Debemos obtener el fichero que queremos subir, ya sea mediante alguna librería de terceros (como dropzone.js) o con un …

Sigue leyendo Subir Fichero en SharePoint Online desde SPFx via JSOM (React + Typescript)

Subir Fichero a una Carpeta en SharePoint Online desde SPFx via JSOM (React + Typescript)

Para saber como subir un fichero a una librería de SharePoint podéis seguir el anterior post donde se explica paso a paso: Subir Fichero en SharePoint Online desde SPFx (React + Typescript) Para subirlo al Root Folder hacemos: let fileToUpload = docs.get_rootFolder().get_files().add(fci); Si queremos subirlo a una carpeta, podemos simplemente navegar hasta ella antes de añadir …

Sigue leyendo Subir Fichero a una Carpeta en SharePoint Online desde SPFx via JSOM (React + Typescript)

Iterador FOR en Typescript (FOR IN vs FOR OF)

El bucle FOR de Typescript nos permite utilizar en cada iteración tanto el índice como el elemento de la lista de objetos.   FOR ... IN El iterador For-In nos dará el índice en el que nos encontremos: for (let index in myObjects) { //En cada iteración tendremos el índice en la variable "index" //("0", …

Sigue leyendo Iterador FOR en Typescript (FOR IN vs FOR OF)

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

Forzar el Stop de los Crawls por Power Shell

Este comando detiene todos los Crawls que no estén en estado "Idle": Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | ForEach-Object { if ($_.CrawlStatus -ne "Idle"){ $_.StopCrawl() } } Con este comando podemos ver el estado de los Content Source: Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | select Name, CrawlStatus

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

Retrieve User Profile Properties using Client Object Model in SharePoint 2013

I've found an interesting link about how to retrieve some properties of user profiles in SharePoint 2013 by using its client object model, like this: const string serverUrl = "http://serverName/"; const string targetUser = "domainName\userName"; ClientContext clientContext = new ClientContext(serverUrl); PeopleManager peopleManager = new PeopleManager(clientContext); string[] profilePropertyNames = new string[] { "PreferredName", "Department", "Title" }; …

Sigue leyendo Retrieve User Profile Properties using Client Object Model in SharePoint 2013

Maximum number of items that can be serialized or deserialized in an object graph is ‘65536’. Change the object graph or increase the MaxItemsInObjectGraph quota

Si nos aparece este error especificado en el título podemos solucionarlo aumentando el valor de MaxItemsInObjectGraph del siguiente modo: Error Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. Solution: Edit app.config <configuration> [...] <system.serviceModel> [...] <client> <endpoint address="URL" …

Sigue leyendo Maximum number of items that can be serialized or deserialized in an object graph is ‘65536’. Change the object graph or increase the MaxItemsInObjectGraph quota