Referenciar Framework Objective-C en mi App Swift

Para referenciar un framework de terceros que todavía esté hecho en Objective-C debemos crear una cabecera puente. Crear una clase Header, por ejemplo "Swift-Bridging-Header.h". Escribimos dentro la referencia al framework, por ejemplo: "#import <mylibrary.h>". Vamos a las opciones de la App, bajo la pestaña "Build Settings". Buscamos en la categoria "Swift Compiler - Code Generation" la …

Sigue leyendo Referenciar Framework Objective-C en mi App Swift

Mostrar Mensaje de Confirmacion en PowerShell

$caption = "TITLE" $message = "MESSAGE" $yes = new-Object System.Management.Automation.Host.ChoiceDescription "&Yes","HELP_FOR_YES" $no = new-Object System.Management.Automation.Host.ChoiceDescription "&No","HELP_FOR_NO" $choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes,$no) $answer = $host.ui.PromptForChoice($caption,$message,$choices,0) if($answer -eq 0){ //YOUR_CODE_IF_YES }

Añadir Site Column del tipo Lookup Field via PowerShell

Con este script podeis crear columnas del tipo Lookup a una lista en SharePoint: $web = Get-SPWeb "WEB_URL" $list = $web.Lists["LIST_NAME"] $lookupFieldXML = '<Field Type="Lookup" DisplayName="NEW_FIELD" Required="FALSE" EnforceUniqueValues="FALSE" List="{LIST_ID}" ShowField="Title" UnlimitedLengthInDocumentLibrary="FALSE" RelationshipDeleteBehavior="None" SourceID="LOOKUPLIST_ID" StaticName="NEW_FIELD" Name="NEW_FIELD" ShowInDisplayForm="TRUE" ShowInEditForm="TRUE" ShowInNewForm="TRUE" RowOrdinal="0" />' $a = $list.Fields.AddFieldAsXml($lookupFieldXML, $true, [Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView); $list.Update(); $web.Dispose();

Crear y añadir columnas a un Content Type via Power Shell

Nota: Al final de la explicación está el código entero para copy-paste. Nota: Si no lo ejecutamos directamente desde la SharePoint Management Shell debemos añadir su SnapIn: Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue 1. Declaramos el sitio web y el content type al que queremos añadir la columna $web = Get-SPWeb "YOUR_URL" $ctype = $web.contenttypes["YOUR_CONTENTTYPE"] 2. Declaramos …

Sigue leyendo Crear y añadir columnas a un Content Type via Power Shell

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&amp;ListID={" + listID + "}&amp;ID=" + itemID …

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

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)

Crear SPSubscription Settings Service Application (5 Pasos)

1. Abrir SharePoint Management Shell. 2. Crear el Pool: $AppPool = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account DOMAINuser 3. Crear la App: $App = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPool -Name SettingsServiceApp -DatabaseName SettingsServiceDB 4. Crear el Proxy: $proxy = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $App 5. Iniciar la instancia: Get-SPServiceInstance | where{$_.TypeName -eq "Microsoft SharePoint Foundation Subscription Settings Service"} | Start-SPServiceInstance

Workflows en SharePoint 2013

1. Instalar y configurar Workflow Manager: http://ranaictiu-technicalblog.blogspot.com.es/2013/02/sharepoint-2013-workflow-manager.html 2. Crear App Management Service Application + Proxy: http://www.c-sharpcorner.com/UploadFile/anavijai/error-app-management-shared-service-proxy-is-not-installed/ 3. Crear State Service Application + Proxy: http://www.codeproject.com/Articles/710271/State-Service-configuration-in-SharePoint-for

Cargar JQuery en el navegador de forma dinamica

Sirve, por ejemplo, para cuando queremos probar nuestro código javascript en JQuery pero la página no tiene la librería cargada. Ejecutamos este código primero en la consola del navegador y la cargará: (function(){ var newscript = document.createElement('script'); newscript.type = 'text/javascript'; newscript.async = true; newscript.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'; (document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(newscript); })();