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

Error Microsoft SharePoint is not supported in 32-bit process

Error An unhandled exception of type 'System.PlatformNotSupportedException' occurred in Microsoft.SharePoint.dll Additional information: Microsoft SharePoint is not supported in 32-bit process. Please verify that you are running in a 64-bit executable. Explicación Se trata de un proyecto que se esta ejecutando en modo 32 bits y la librería de SharePoint no está soportada, debe ser en …

Sigue leyendo Error Microsoft SharePoint is not supported in 32-bit process

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

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

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

ERROR: Retrieving the COM class factory for component with CLSID {‘XXX…’} failed due to the following error: 80040154

ERROR Retrieving the COM class factory for component with CLSID {'XXX...'} failed due to the following error: 80040154. CAUSE You're trying to build your project in x86 and you've to do it in x64. SOLUTION 1. Go To Your Project Properties. 2. Select 'Build' (Left Tabs). 3. Change the property 'Platform Target' to 'Any CPU' …

Sigue leyendo ERROR: Retrieving the COM class factory for component with CLSID {‘XXX…’} failed due to the following error: 80040154

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