Obtener Datos de Servicio REST con RestSharp

Este fragmento de código nos permite hacer una llamada a un Web Service REST mediante la librería RestSharp. var client = new RestClient("REST_SERVICE_URL"); client.Authenticator = new HttpBasicAuthenticator("USER", "PASSWORD"); var request = new RestRequest(Method.GET); request.RequestFormat = DataFormat.Json; IRestResponse response = client.Execute(request); var content = response.Content;

Eliminar una columna de todas las listas via Power Shell

Puede ocurrir que al crear una Site Column y agregarla a un Content Type, nos hayamos equivocado en algún parámetro (el campo Required, por ejemplo). Hemos decidido borrar la columna y para ello la borramos del Content Type y procedemos a eliminarla de las columnas de sitio. No obstante, si tenemos listas que utilicen ese …

Sigue leyendo Eliminar una columna de todas las listas via Power Shell

Abrir Página como Modal/PopUp

Para abrir una página como Modal en SharePoint tan solo debemos implementar la función showModalDialog y llamar al método con la url y el titulo: function openDialog(pageUrl, dialogTitle) { SP.UI.ModalDialog.showModalDialog({ url: pageUrl, width: 800, height: 600, title: dialogTitle }); } Aquí podéis encontrar todas las opciones disponibles para configurarlo: https://msdn.microsoft.com/en-us/library/office/ff410058(v=office.14).aspx

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

Crear un contador de tiempo en SpriteKit con Swift

Con el siguiente código crearemos facilmente un contador de tiempo en milisegundos que nos servirá para poder guardar el tiempo que ha durado la partida del jugador. En primer lugar, debemos tener una variable para almacenar los milisegundos, una Label donde mostrarlo durante la partida y un booleano para controlar cuando se acaba el juego: …

Sigue leyendo Crear un contador de tiempo en SpriteKit con Swift

SharePoint Document Library Definition XML Guide (Schema.xml)

Versioning Settings Create a version each time you edit a file in this document library? <List [...] VersioningEnabled="TRUE" EnableMinorVersions="FALSE"  >[...]</List> Advanced Settings Allow management of content types? <List [...] EnableContentTypes="TRUE" >[...]</List> Default open behavior for browser-enabled documents <List [...] DefaultItemOpen="PreferClient" >[...]</List> <List [...] DefaultItemOpen="Browser" >[...]</List> Dialogs (Launch forms in a dialog) <List [...] NavigateForFormsPages="FALSE" >[...]</List> Validation Settings Set …

Sigue leyendo SharePoint Document Library Definition XML Guide (Schema.xml)

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