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

Mostrar un elemento en funcion de un valor en AngularJS

Podemos mostrar u ocultar un elemento utilizando una función personalizada para poder realizar todas las comprobaciones que necesitemos para tomar una decisión. Ejemplo: Tenemos una tabla y queremos mostrar un elemento (por ejemplo, un icono) en cada fila solo en el caso en el que la propiedad "itemDate" del item es la fecha de hoy. …

Sigue leyendo Mostrar un elemento en funcion de un valor en AngularJS

Crear notificaciones nativas de SharePoint en código cliente

Crear notificación propia de SharePoint: var notifyId = ''; notifyId = SP.UI.Notify.addNotification("Hello World!", true); El primer parametro es HTML (podemos personalizarlo). El segundo parametro es para que desaparezca: "true" hará que se mantenga hasta que clickemos sobre él, "false" hará que desaparezca al cabo de unos segundos. notifyId tendrá el identificador, que nos servirá para …

Sigue leyendo Crear notificaciones nativas de SharePoint en código cliente

Borrar DLL de la GAC

El método correcto de borrar DLLs de la GAC es el siguiente: 1. Abrimos la consola de Visual Studio (Developer Command Prompt for VS2013 en el caso de Visual Studio 2013). 2. Navegamos hasta el directorio donde están nuestras DLL (cd C:WindowsMicrosoft .NETassemblyGAC_MSIL). 3. Ejecutamos el siguiente comando: gacutil -u NOMBRE_DE_MI_DLL Ejemplo (Borrar la DLL …

Sigue leyendo Borrar DLL de la GAC

Como ocultar el enlace «Contenidos del Sitio» del menú de SharePoint 2013

En el menú lateral izquierdo de nuestras páginas de SharePoint podemos ver que el último enlace es el de "Contenidos del Sitio". Este menú está distribuído en dos bloques: El primero contiene todos los enlaces del menú (sites, páginas...), el segundo contiene este enlace a los contenidos de nuestro site. Para ocultarlo, podemos aplicar un …

Sigue leyendo Como ocultar el enlace «Contenidos del Sitio» del menú de SharePoint 2013

Hide elements in Modal Dialog (SharePoint PopUp)

When a page is loaded in a Modal Dialog, its URL ends with "IsDlg=1", that means that it's being opened in a SharePoint PopUp. If you need to hide some elements when that happens (e.g. hide master page elements) you need to add a new class to these elements: Adding class "ms-dialogHidden" to an element …

Sigue leyendo Hide elements in Modal Dialog (SharePoint PopUp)

Hide «div» that contains a specific «div» in one of its children (at any level)

We want to hide "Level1" div that contains inside any "Level3" div in this code: <div class="level1"> Level 1A <div class="level2"> Level 2A <div class="level3"> Level 3A </div> </div> </div> <div class="level1"> Level1B <div class="level2"> Level2B </div> </div> We can do it by JQuery, once the page is loaded, that way: <script type="text/javascript"> $(document).ready(function(){ hideLevelOne(); …

Sigue leyendo Hide «div» that contains a specific «div» in one of its children (at any level)

Hide Elements List in ‘Details View’ and See Only its Properties in SharePoint

If you want to use the details view on a list or library and you don't want to see the list of elements (maybe you need to show only one item, or you're going to select that item on another webpart) you can hide it doing the following: 1. Edit Page. 2. Create a new …

Sigue leyendo Hide Elements List in ‘Details View’ and See Only its Properties in SharePoint