Share this page

Wednesday, April 12, 2017

SharePoint Saturday Madrid

image

If on May 20 you are close, you like SharePoint and all Microsoft collaboration technology then I recommend that you sign up for SharePoint Second Saturday Madrid, as it will be very good. As I know, simple, I know the organizers and above all I just see the grid of speakers who will be speaking and all of them are front line professionals and experts.

Check the agenda http://www.spsevents.org/city/Madrid2017/sessions of the event to finish convincing you that you have to be and finish convincing your boss to let you go, since I assure you that after the 20 de Mayo you will know much more about SharePoint and Microsoft collaboration technology.

But above all, the event is FREE, so do not hesitate, sign up here and participate in it, you will not regret it.

Saturday, April 8, 2017

Storing documents in SharePoint in an orderly fashion

When working with SharePoint, we commonly handle electronic documents generated directly on the platform or loaded into a document library. While the maximum number supported by a library is very large, there are some restrictions regarding the number of documents per view supported by libraries, that's where we must start to handle carefully as we upload documents. Even in these times, many users who use SharePoint do so through developed applications that connect directly through different services and provide a richer user experience than the platform itself and even from mobile devices. The use of folders allows us to quickly sort the documents we want to store, establishing an order and a quick categorization to save documents. This way users can not only store all the millions of documents that are supported, but also can access them in a simple way. The following image shows a document library with a folder created using the SharePoint interface.

clip_image002[4]

Screenshot 1 - Document Library in SharePoint

But as we can do to create a folder in a library from a mobile application or an external system to SharePoint, the solution is in the Client Side Object Model (CSOM) API. This API allows you to connect from any .Net application to SharePoint and manipulate the elements of a library, list or a website properly. In the following example, you will create two folders through CSOM and a .Net console application. Once the project is created in Visual Studio, the next step is to add the references to the API as you can see in the following image.

clip_image004[4]

Screenshot 2 - Adding CSOM API references to Vs.Net

Finally, replace the entire application code with the code shown below and run the application, enter the password of the user you are using to connect and press "Enter". When you finish running the console application, access the library in question and you will find two newly created folders.

To execute the code correctly you must load the following variables into the code itself before executing it

  • SiteUrl = Enter the URL of the SharePoint site where your document library is located.
  • Query = Enter the name of the document library.
  • NamesArray = Enter the names of the folders you want to create, it's a list, socorrectly you must load the following variables into the code itself before you run it.

using Microsoft.SharePoint.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string siteUrl = "URL DEL SITIO";
            ClientContext clientContext = new ClientContext(siteUrl);
            SecureString securePassword = GetPassWordFromConsole();
            clientContext.Credentials = new SharePointOnlineCredentials("usuario@domino.onmicrosoft.com", securePassword);
            Web rootWeb = clientContext.Web;
            //Obtener la lista
            var query = clientContext.LoadQuery(rootWeb.Lists.Where(p => p.Title == "Documentos"));
            clientContext.ExecuteQuery();
            List list = query.FirstOrDefault();
            string[] namesArray = new string[] { "Invoices", "Orders" };
            foreach (string name in namesArray)
            {
                //Agregar Carpetas
                var folders = list.RootFolder.Folders;
                clientContext.Load(folders);
                clientContext.ExecuteQuery();
                var newFolder = folders.Add(name);
                Console.WriteLine(name);
            }
            //Ejecucion de request
            clientContext.ExecuteQuery();

        }
        private static SecureString GetPassWordFromConsole()
        {
            SecureString securePassword = new SecureString();
            string password = "";
            ConsoleKeyInfo info = Console.ReadKey(true);
            while (info.Key != ConsoleKey.Enter)
            {
                if (info.Key != ConsoleKey.Backspace)
                {
                    Console.Write("*");
                    password += info.KeyChar;
                }
                else if (info.Key == ConsoleKey.Backspace)
                {
                    if (!string.IsNullOrEmpty(password))
                    {
                        password = password.Substring(0, password.Length - 1);
                        int pos = Console.CursorLeft;
                        Console.SetCursorPosition(pos - 1, Console.CursorTop);
                        Console.Write(" ");
                        Console.SetCursorPosition(pos - 1, Console.CursorTop);
                    }
                }
                info = Console.ReadKey(true);
            }
            Console.WriteLine();
            securePassword = new SecureString();
            //Convert string to secure string 
            foreach (char c in password)
                securePassword.AppendChar(c);
            securePassword.MakeReadOnly();
            return securePassword;
        }
    }
}

Sunday, March 26, 2017

Services Application in SharePoint Server

The SharePoint Server Services architecture is one of the most robust and scalable features of the platform since it allows you to activate services on different servers on the farm and even be able to have the same service activated within different servers. When planning a SharePoint Server farm, we must consider how it will be used and what features end users need. Over the past few years I have encountered SharePoint deployments where basic considerations have not even been taken into account, services running on wrong servers, databases with little or no optimization, and many other bad configurations that end up affecting the Overall performance of SharePoint and thus making end users have a bad experience with the platform. Services must be planned one by one, it should not be forgotten that each service consumes a set of resources within each server where it is activated and even some of the services could be redundant to ensure the availability of the same.

image

ScreenShoot 1 - Farm Services Architecture SharePoint Server

Together with 2 friends, Gustavo Velez and Juan Carlos Gonzalez wrote a series of articles on MSDN about the services of SharePoint Server, then I leave the links to them

Today we have the new version, SharePoint Server 2016 and as such, the services architecture remains one of the pillars of the platform. But you must also keep in mind that the architecture that SharePoint provides is extensible and you can create custom services that are hosted in a SharePoint farm to provide different functionality to end users. In the following link, SharePoint Custom Service, you can download the source code of a custom service that exposes an operations serié against a database. The service was created for SharePoint Server 2013, but it works perfectly for SharePoint Server 2016.

Saturday, March 18, 2017

Accessing Items in a List in SharePoint Online Using a View

The use of Office 365 became a standard within organizations that want to have a collaborative, management and communication environment. Among the features we have, is SharePoint, which allows you to build workspace to store records or documents. The storage structures, Lists and Libraries, have the ability to have specialized views that allow users to access data or documents under certain criteria of filter, order and even metadata (Columns) that we want to be displayed.

image

Screenshot 1 - Configuring a view in SharePoint Online

When we have to develop a component or access a set of records or documents that are in SharePoint Online, views can be a good mechanism for accessing data in an efficient and orderly manner. Recall that when using Office 365, we are using the On-Line version, which means that the data we query must be transported from the Microsoft Cloud to the client where the query is running. To test the use of views to access data, create a console application by using Visual Studio 2015, add the references to the following assemblies "Microsoft.sharepoint.client.dll" and "Microsoft.sharepoint.client.Runtime.dll ", Finally replace the code of the" Program "class with the one below.

using Microsoft.SharePoint.Client;
namespace ConsoleApplication

    class Program
    {
        static void main(string[] args)
        {
            using (ClientContext ctx=new ClientContext(“http://sitio”))
            {
                //Credenciales
                ctx.Credentials = new System.Net.NetworkCredential(“Usuario”, “Clave”);
                Web web = ctx.Web;
                ctx.Load(web,w=>w.Lists);

                List list = web.Lists.GetByTitle(“Lista”);//Cargar Lista
                ctx.Load(list, l => l.Views);
                ctx.ExecuteQuery();

                CamlQuery query = new CamlQuery();
                ListItemCollection itemColl = null;
                View view = list.Views.GetByTitle(“Vista”);//vista

                ctx.Load(view, vw => vw.ViewQuery);
                ctx.ExecuteQuery();
                query.ViewXml = string.Format(“<View><Query>{0}</Query></View>”, view.ViewQuery);

                itemColl = list.GetItems(query);
                ctx.Load(itemColl);
                ctx.ExecuteQuery();
            }
        }
    }
}

Before running the console you must change the following values ​​to work correctly:

Http://site = URL of the SharePoint Online site to which you want to connect.

User = Email of the user that will be used to connect to the site.

Password = Password of the user to connect to the site.

List = Name of the list or library to which you want to connect.

View = Name of the view you want to use to access the records or documents. Remember that the view must be created.

Friday, March 10, 2017

Automation Word Documents on SharePoint

Over the last few years at Siderys we have built many Enterprise Content Management (ECM) solutions in SharePoint and Office 365, where document management and digital content have been designed and implemented for our customers. SharePoint is a well-prepared platform with many features to handle ECM documents and solutions, ranging from a powerful search engine to specialized metadata management services that allow you to catalog documents, manage their metadata and even store documents automatically in different locations based In the cataloging made by the user.
A feature that gives a lot of versatility to end users is when using Microsoft Office, connected to SharePoint, as it allows you to use templates or documents linked to the cataloging (Content Type) made and their metadata. The document being linked to SharePoint provides the possibility of adding the metadata as elements of the content of the document.
In order to test this feature we will use a document called "Progress Report" which will be linked to a content type that will bear the same name and will contain a series of metadata that can be embedded as part of the content of the report. In the following image you can see part of the document to be used linked to the SharePoint content type.

clip_image002

Screenshot 1 - Document associated to the type of content

The next step is to create a content type on a SharePoint site, it should be called the "Progress Report" and it will have 4 metadata:

1) Title -> Default SharePoint column of the type text and mandatory. In the same we will handle the name of the project

2) Client -> Column type text and mandatory.

3) Project Status -> Column of the election type and mandatory. In the same one must load the options that are wanted to handle.

4) Current Stage -> Column of the election type and mandatory. In the same one must load the options that are wanted to handle.

Finally, in the advanced section of the type of content you are creating, you must associate the corresponding document so that it is linked in SharePoint and configured to be able to be used in a document library. It is at this moment, when we associate it with a library, that we will edit the same and perform the linking of the metadata with the content of Word. In the following image you can see how the type of content was built and configured for use in any library.

image

Screenshot 2 - Content type "Progress Report" created in SharePoint.

You now need to set the content type in a document library so that you can use the metadata within the associated template. This is only possible when the type of content is being used inside the library, not when we are configuring it in the site. This is because SharePoint is just now creating the instance of the same and providing a storage space within a library to be able to use the same. The following link shows how to associate content types with a library, Office.

Now that the content type has been configured, it must proceed to configure the metadata of the content as part of the document content. Access the library settings, in the "Content Types" section select the type of content previously associated, select the "advanced settings" section and finally select the "Edit Template" link that appears under the name of the document that previously Associate This will open the Word document so that you can modify the corresponding template. The next step is to insert the metadata as part of the content, position the cursor in the section of the document, in our example we will enter the metadata title in the top table associated with the name of the project. In the Ribbon select the "Insert" option, then select the "Quick Parts" command in the "Text" section and finally position the mouse pointer over the "Document Properties" option to list all properties linked to the Same, as you can see in the following image the four metadata created in the content type are listed.

clip_image006

Screenshot 3 - Linking SharePoint metadata as part of a Word content

As a final part of the example, the four metadata created in the content type were linked and some properties, such as the author, electronic mail and publication date of the report, were also linked as part of the content of the document. Save the changes made to the template and finally close the template so that we can use it in the document library.
To test it, access the library, in the Ribbon select the "Files" tab, then display the "New Document" command options and finally select the "Progress Report" option to generate a document based on the type of Content that is set up. If you change the content type metadata values in the server properties panel as you can see in image 4, the values associated with the body of the Word will be modified.

clip_image008

Screenshot 4 - Creating a document based on the type of content created.

This kind of feature that SharePoint and Microsoft Word provides allows you to create documents automatically through a routine or a flow, allowing content to be loaded automatically. Load a document or create a new item in the list by loading the field values so that the document covers life

Sunday, February 5, 2017

Create and configure Enterprise Project Type – Project Server

The Project Server tool, both its Online version and its version On Premise that runs on the SharePoint platform allows to create types of enterprise projects. Not all organizations have to perform this configuration to use the tool, in fact, if the only thing that is wanted is to control the work, allocations, resources, times, costs and other variables that a project handles, then it can be used The type of enterprise project (ETP) that comes by default with Project Server.

Now, if an organization seeks to incorporate a methodology, for example it would like all its projects to be executed following PMI, then the recommendation is to create a type of new business project in the tool. The definition of a personalized ETP allows the following advantages:

1) All projects that are created using this type of project will be identified within the project portfolio under this type.

2) You can associate a flow (WorkFlow) to control the project life cycle. That is, any step that the methodology requires to be carried out will be controlled by this flow.

3) Customize the detail pages of Project, allowing each Phase and Stage of the project to display a specific screen to capture data.

4) You can configure ETP only so that it can be used by one or more departments of your organization, this means that you can configure the tool so that only members of the Engineering area use this type of business project.

5) A Gantt project template specifies the type of business project you are creating

6) You can configure a particular SharePoint site to handle the entire project documentation, which means that when you create a project in the tool using your template, a SharePoint site will be created as defined.

In the next post will see how all these configurations that will be made individually are going to go mating with each other so that everything is taking shape.

In order to create an Enterprise Project, ETP, in Project Server, we must access an instance of our PWA (Project Web Access), as you can see in the following image:

 

image

Screenshot 1 - Project Server PWA Home

Follow the steps below to configure an ETP within Project Server:

1) Select the gear in the upper right, then select "PWA Configuration.

2) The configuration screen contains several sections, in the section "Workflow and project detail pages" select the "Business Project Type"

3) In the new window, in the toolbar select the option "New Type of Business Project"

4) Enter the following values ​​for the new ETP being created.

  • In the field Name: PMI
  • In the "New project page or project detail pages" section, select "Project Details", "Project Information" and "Schedule", then select the ">" button to load them and make them available.

5) Leave the other options by default, which in the next post will be configured as you create and configure the other options. Select the "Save" button at the bottom of the page.

image

Screenshot 2 - List of Business Projects.

The ETP is available for use within the PWA to create a project using this type of project, access the PWA home and select the "Create or Import Projects" tab.

As you can see in the following image, the business project type (ETP) is already available to be used within Project Server.

image

Screenshot 3 - ETP available to use.

Now you can create your first project in the tool based on your own type of business project that will allow you to control the projects that have to be carried out in a certain methodology. In the next post you will see how you can add other configurations, custom data and configure the flow (WorkFlow) to follow.

Thursday, January 26, 2017

Project Server, steps to build a methodology

Once we have the tool at our disposal, we can start working with it without any configuration, that is, we started to upload projects and carry them in the project portfolio without any control, the tool box and without any configuration Will begin to help control the resources and the execution of them.

But what happens when in an organization wants to apply a methodology that allows you to control the project from the conception of the same through execution and finally closing, at this point we must configure Project Server to apply the methodology desired. It is worth noting that this configuration can be done in both Project Server Online and in an instance of Project Server On-Premise, when using each one of them, we will see it in another post.

The following image shows the sequence of steps we must follow to achieve the implementation of a successful methodology within Project Server.

image

Wednesday, January 18, 2017

Install Project Server 2016 in a farm of SharePoint Server 2016

In the new version of the SharePoint Server 2016 platform, Project Server is included in the product and no additional components are required to be installed on the farm. If we want to enable Project Server in a SharePoint Server farm, the first thing to do is to enter the license of the product by running the following command in PowerShell:

Enable-ProjectServerLicense -Key <LicenseKey>


Once Project Server is enabled, the configuration process is the same as in previous versions, we must create the service application within the farm to be provisioned.

image

Once the service is provisioned, we can configure our Project Center within the farm, unlike previous versions we had to create a site based on a given template, now the product is embedded within any existing site collection, since the Enabling the PWA is now achieved through a feature of the site collection and which we can enable in any existing collection within the farm running the following command:

Enable-SPFeature pwasite -URL <http: // server> / <site collection>


At the end of the command the collection of sites will be configured as PWA within our farm, for which we can use it to manage projects and our organization.

image

As you can see the new model about Project Server in the SharePoint collaboration area since it can be embedded within any structure already created within the organization, ie if you migrate your farm to SharePoint Server 2016 and now want to enter the Managing projects to your organization using Project, in an existing area can do it without problems. If you want to start from scratch or try Project Server, I recommend that you create a new site collection by using the following PowerShell command that uses a site template named PWA # 0 that is not available through the UI SharePoint Server.

New-SPSite -ContentDatabase ContentDBName -URL SiteCollectionURL / PWASiteName -Template pwa # 0

Saturday, January 14, 2017

WorkFlow Project Server y Project Online

Both Project Server 2010, 2013 or 2016 and Project Server Online allow you to design a WorkFlow that will be associated with the projects running on the platform. This WorkFlow allows you to model a project methodology that you want to follow the organization and control the complete process that the projects must fulfill, from its conception, to execution and subsequent completion. In this series of articles we will be seeing how we can use this tool to control the execution of our projects and that the PMO office and our M's have better control during their life cycle. Next I leave an image of a process already defined in Project Server and that will be used as the basis for the construction of the WorkFlow and all the configurations that we must carry out in the tool.

Saturday, May 31, 2014

El SharePoint Saturday Day fue un éxito

The event #spsaturdaycol has been successfully in Bogotá Colombia. Here you can see some pics and the presentations that I could share with the attenders. I want say “Thank you” to the people who works in the event and in special to Andres Rojas to invite me.

Here can you see the presentation

 

 

Here you can see some pics.clip_image001

clip_image002

clip_image004