Tuesday, January 26, 2016

Syncing fields from Project Pro to SharePoint Online

Something that started as a quite simple requirement turned out into a more hefty task, so I decided to share it here.

So the requirement: Be able to sync fields from Project Pro to a SharePoint Task List in SharePoint Online. All great, works out of the box, with the exception of 2 things:

- If the column in SharePoint is of type "Multiple lines of text" and the type of text to allow is "Enhanced rich text (Rich text with pictures, tables, and hyperlinks)" that doesn't work correctly.

- If the column is of type "Person/Group" then this doesn't work as expected. Some resources are missing on consecutive synchronizations from Project Pro to SharePoint Online. I've taken this with MS to see what's going wrong, but for now if it happens to you - configure your resource or "Assigned To" (named by default) column to be of type "Single line of text" or think of it as just a string.


You will loose the functionality to check the person's status in Skype for Business (if you use that) and to click on the user profile and go to their Delve page (in Office 365). But you'll still be able to sort and filter on that column if you want to view a particular person's tasks.


I'll describe the steps needed to match the requirement to sync Task Descriptions to SharePoint Online. 


By default, the Description column in the Task Lists (coming with the default Task Content Type) is of type Multiple lines of text and has the "Enhanced rich text (Rich text with pictures, tables, and hyperlinks)" as the allowed type of text. I've just renamed the column in this example:







Fill in some tasks if you're the PM (or just one if you're a lazy blogger like myself):




Then open the Task List with Project Pro (provided you do have the license assigned and the software installed from the Office 365 Portal):





You won't see your description column:





When you go to File -> Info -> Map Fields, you won't be able to map anything to it:



Now, part of the solution is to change your column allowed text type to Plain Text in SharePoint.





But even then, you won't see it in Project Pro the next time you open your project plan.

The key is in the mappings. Add a new column in Project Pro. You can choose some of the predefined text columns, e.g. Text1:





Name it whatever you want, let's do Task Description to avoid any confusion. Hint: the columns in Project Pro and SharePoint Online don't really have to be using the same naming convention, as long as they're mapped. Right click on your newly created column and go to Field Settings (and no, double clicking on the column doesn't do what double-clicking on a row does, sorry):





Tile field - self explanatory:






Now, when you go back to the Map Fields you can definitely map your newly created column in Project Pro (although its name is not reflected in the mapping list - dunno why) to your SharePoint Online column which appears nicely as Task Description:





Once you're done with all your mappings, just click the huge Save button.

If you've tried to break things like me and inserted different values in the field in SharePoint Online and Project Pro, then you'll get this good warning. Skip this if you're a good user and didn't do that :)

The warning basically is quite liberal - it gives you the option to choose whether you like your Project Pro or your SharePoint Online value better and it's even displaying them and color-coding them for you. I'll keep the Project Pro value which says "Sync this description":





Boom! It's done.




(Optional) If you want to break things even further, you can go back to your column in the SharePoint Online Task List and change it to allow Enhanced Rich Text again and then open the Task List with Project Pro. You'll see this (and believe me, it gets even uglier when you include some links, etc.)





Hope that's helpful if you stumble upon it, I'll keep another post once I sort out the issue with syncing resources without using the string field workaround with MS (if at all).

Wednesday, January 6, 2016

New Year...OneDrive new UI and a bug in it

Update 01/02/2016: It seems that through the new UI you can now even upload folders (one by one for now) with drag & drop! Great functionality that has been missing so far...

Hey, it's been a while since my last post...holiday season got us all, right? :) Happy New Year, everyone! Let it bring you a lot of new tech, gadjets, innovations and of course health and happiness!

It's been more than a month since we all could use the OneDrive new UI and I've decided to share my first positive impressions of the it and a very unpleasant bug unfortunately, so you can take an informed decision whether to use it or switch back to the classic experience.

First, it looks really nice, based on HTML5 and it's even responsive! Good job so far for the OneDrive team. There must be something with Jeff Teper going back to leading the SharePoint and OneDrive divisions @ MS :)

The menus are arranged in a better way, even though the Version History is still kind of hidden in the context menu.












You can now drag & drop stuff in the browser... e.g. move a file or folder into another one - how cool is that? Let's hope we'll see that in SharePoint some day... which is still using some old-school XHTML 1.0.




There's also a file size column now added, which I don't use that much, considering the 1 TB storage limit, but anyway... another small improvement.

Now tot he bad news...

Whenever you try to share a folder (and it happens with files sometimes) and share it with more than 1 person they DON'T all get the notifications over email. E.g. you share it with Peter, Joe and Dean, then you check your mail (as you're in cc of those notifications by default) and realize that only Peter got the email with the link to the file.

Unpleasant.

After I've talked with one of my friends at Microsoft, I got a confirmation that this issue is only present in the new UI and is being worked upon, however it's now taking a few weeks and there's no resolution.

It all works just fine if you do share the file/folder with one person. And of course you can always forward the notification to the appropriate people once you see it in your inbox, but this is what OneDrive's for - avoid shooting a bunch of emails about the same file.

I'm hoping to see this resolved soon, otherwise we'll just have to use the classic experience...which is not that sophisticated to be honest, but at least one of its basic functionalities (the notification) works.

I might write another post about the NGCS (Next Generation Sync Client) that I was testing as part of the preview for more than a month now... still some mixed feelings about it, if you plan to use both the new UI and the new client organization-wide, maybe you should hold on...

Thursday, December 3, 2015

Office 365 down in Europe

Today Office 365 went down in Europe and it's down since more than 3 hours at the time of this post.

OK, Microsoft, it's technology - we get it, and you'd still make the numbers in the SLA report due to the high number of users you've got.

But there's something more worrying in today's scenario - communication!

Wouldn't it be nice to put up something on the http://status.office365.com page rather than the bogus message below? And not asking people to login to their tenants and check their dashboards? When in fact they CAN'T login at the time of calling you...


People are relying on this platform for their daily jobs, and a good communication would have been key in user satisfaction with the products. The communications today is absolutely ridiculous.

I even got a call from one of your support reps asking me to do a remote session and see one of our other issues we're experiencing, so I kindly had to inform him everything is DOWN in Europe!

Meanwhile, we had to find the hard way what's working and what's not, e.g;

- OneDrive sync is working
- OneNote sync is working
- Yammer mobile app is fine (if you haven't logged out)
- Everything else is FINE if you were logged in and haven't logged our prior to 11:00 this morning.

I'd say this is a complete communication failure on your end today...



And while you've put this nice little "warning" message on the Azure portal status, it's still unclear and doesn't mention Office 365 (you need to be aware it's dependent on Azure) and it's saying North and West Europe...while NO ONE in Europe can't go to the Login Portal.


Monday, November 23, 2015

1 TB space in SharePont Online! /not OneDrive/

Update 18/02. The space has reappeared (this time as 1 TB - expected) although the feature on the roadmap is still "In Development".




Update: Microsoft has reclaimed this space and when talking to them, they said this was "a test 2 TB rollout to select tenants", and ours is not a First Release one. Shame.

Anyway, they said by the end of January all tenants (first they claimed Enterprise only) should get upgraded to 1 TB.

On this foggy November morning, I've logged in to the admin panel in one SPO tenant and saw this!


Prior to Friday afternoon, that space was ~130 GB, based on the well-known formula 10 GB + 0.5 GB per licensed user. 

The O365 roadmap says Office 365 tenants will now get 1TB + (500MB * # of E/A/G users) but this feature is still in development, and our tenant is not a FR one.

Have you already observed the storage increases in your tenants?

By the way, thanks Microsoft! Really generous :)

Friday, November 6, 2015

People Directory with CSWP

Today I started to work on a mock-up of a People Directory which is not utilizing anything else, but a Content Search Web Part due to the easy customization Display Templates and the powerful features it offers. It already has som good templates like Large picture for example, that will be all I need + Department and Job Title (which will be managed properties, linked to a term set).

Even though this Web Part is heavily promoted and is supposed to enhance/replace the good old CQWP, it doesn't work right away as you'd expect (at least in SharePoint Online).

Let's imagine you create a blank page and you add the Web Part.

You then configure your query - it'll be very simple "@*onmicrosoft.com" so that I can get all the people from my demo tenant

As you can see, the query is tested and it simply works. Then you save your Web Part and get this:


Some people suggested that this Web Part is not available in SharePoint Online Plan 1 and they've been in touch with Microsoft Support .... which I have to use in production... but I couldn't find an official source stating that. I think that's old information, I think the web part was not even available in SharePoint Online in the beginning. I know it's definitely not available on-premise if you don't have the Enterprise version.

I've also tested this on my demo tenant which is on SharePoint Online Plan 2... and I got the same results. Turns out pretty simple, I just had to enable the Cross Site Publishing feature on the site collection and the web part works.

+ a little bit of CSS = a sample of my desired outcome:


The next thing is to find out which properties we want displayed in these boxes, if they're custom ones they should be mapped to a managed property first before we can stick them in here.


But that will be another blog post :)

Thursday, October 15, 2015

Using "#" in SharePoint Navigation items

Morning folks, that's going to be one of my favorite blog post types - a short one :) 

Yesterday I've had to design a Help Section for our Intranet. I thought that this shouldn't be a static Word or PDF document, but instead wanted to make it a bit more dynamic and engaging to the users. That means a page or a site... whatever you choose, based on how big your Help Section would grow... and what's the current level of training of your users. I'll use a site for my solution having in mind it's easy to scale this up. So... what I want to have in there is something like this nice and modern-looking FAQ template by CodyHouse.

The functionality to click on a category (Basic) for example and automatically scroll to the respective section on the page (ul with id #basic) is what I found challenging with the current setup in SharePoint.
Instead of using a custom categories list in the page, my goal is to use the container for the Current Navigation (Quick Launch) which is already there. This will give us consistent look & feel across the whole site.

The problem I've found today is that "#" is actually not working in the links of the SharePoint navigation...if you're using Structural Navigation for your site. No matter where you insert it, on save your links will always default. To see what I mean, here's the link that I insert and save.

In the reality, I get this in the browser (all of them):

So... my solution was a quick win this time - switch to Managed Navigation for this site, create a termset for it and use Simple Links for the navigation terms. Works as a charm.

What you see...

...is what you get:


Monday, October 5, 2015

Injecting JavaScript in a SharePoint Online site collection the proper way

With recent changes in Office 365 branding guidelines, it has become significantly more difficult to insert small bits and pieces of functionality like a 10-line JavaScript, for example. I had to do this in order to bring the same global navigatoin that we use in our main site collection into the Search Center site collection (the requirement is even more difficult if you use Managed Navigation, but that's not the topic of this post).

By default, the navigation is missing from the Search Center in SPO and SharePoint 2013.
A great way to get it back is described in this post by MVP Elio Struyf. But how would you inject the JS in the whole site collection? By default, we have 7 different result pages in this site, and we plan to create more... so here are our options:

1) Insert the script in a CEWP or a Script Editor webpart - manually in each of the pages... time consuming and the need for manual adjustments arises each time you create a new results page.

2) Use custom master page for the site collection - a big No-No for SharePoint Online since a few months.

3) Build a provider-hosted app that can inject your customization :) Great video by the Office 365 PnP team, but it sounds to me like killing the fly with a hammer! 

4) Register it through another .js and forget about supportability and removal with no code... Quick & Dirty approach by Tim Ferro that I'd only ever use as a PoC.. (tested it and does the job by the way).

5) Using PowerShell! Wait, what!? Yep. After some head-banging last Friday afternoon, my friend and PowerShell guru Ivan Yankulov has reminded me that there was a pretty good cmdlet from the PnP-PowerShell project. 

All you need to do is... 

1) Download the project locally
2) Have WiX toolset installed (at least 3.10 if you use VS2015)
3) (Optional) Have Windows Management Framework 4.0 installed if you want to generate the cmdlet Help
4) Install the binaries (\Binaries\PnPPowerShellCommands16.msi) for SharePoint Online
5) Run PowerShell 3.0 as an admin...
6) Have a look at the AddSPOJavaScriptLink documentation.
7) Connect to your SPOnline tenant (Connect-SPOnline –Url https://yoursite.sharepoint.com –Credentials (Get-Credential)
8) Execute the command...

Let's assume I want to inject something called elementshide.js to my whole site collection. So whenever someone creates a site or a page inside, they'll get the JavaScript loaded automatically for consistent site collection-wide user experience. The key parameter is like an identifier for your script  - take a note of this if you want to remove the script reference later on :) The url is basically the path to the script (relative URL is always recommended) and then the scope could be Site for a site collection, or web for a subsite in SharePoint Online. 

 Add-SPOJavaScriptLink -key ElementsHide -url "~sitecollection/SiteAssets/elementshide.js" -Scope Site -Web https://dimitarm.sharepoint.com

9) Verify. Go to your page and view the source code... you'll have the following piece if the injection went through:

if (scriptsSrc.indexOf('/SiteAssets/elementshide.js') === -1) {
var newScript = document.createElement('script');
newScript.type = 'text/javascript';
newScript.src = '/SiteAssets/elementshide.js'; 
headID.appendChild(newScript);
scriptsSrc.push('/SiteAssets/elementshide.js');
}(function(){ 


So this is it... in a little bit less than 10 steps we've managed to make our Search Center navigation show up...and we're ready for a lot more customization done this way. Hopefully the guidelines by the O365 team do not change to something even more complicated in the next months...