Mittwoch, 5. Dezember 2012

Office 365 - upgrade to SharePoint 2013 Search Problems


Actually the first O365 tenants are updated to SharePoint 2013 backend components in the background. This results in some technical difficulties. One is the Search. The SharePoint 2013 Search Engine based on a new / upgraded Search Backend system. The FAST Engine had a big impact in all the new functions and features. More details can be found here: http://nbsharepointtalk.blogspot.de/2012/07/whats-new-within-sharepoint-2013-search.html .

If your tenant is updated to the new backend system but your frontend is still SharePoint 2010 you have some loosing. The point is that a lot of keyword calls not working anymore. For example: Path:"Posts" AND -Path:"personal" (meaning: show all which contains “Posts” but not contains “personal” in result it shows blogposts but not posts from blogs hosted in MySites). The reason is that the Managed Property “Path” no longer exists in the new Search Engine. It is replaced by ”SPSiteUrl” and so on…. Another point is, that the new Keyword Query Language and also FAST Query Language which is now supported in SharePoint 2013 cannot full functionally be used with the SharePoint 2010 UI, even the search backend is upgraded. This is because the SharePoint 2010 Webpart are not able to handle search term like author:starts-with("Nicki"). So this is a poor interims situation at the moment. But the complete update is availible soon ;-) and then we can use the full functionality of the new Search Engine.

Donnerstag, 1. November 2012

Changing a picture in SharePoint Site with JavaScript


During a project we got the request to change a special picture in SharePoint. Because it is an Office 365 / SharePoint Online environment and the picture is located under https://%YourSite%/_layouts/images/.... We cannot change the picture with SharePoint Designer or directly in the file system.
So we have to find another way. Because of the picture it is always the same so we can easily use a script looping through the side. As described in the article “Generate a SharePointlist with all user information in Office 365 environment” we have a list containing all users in the SharePoint Online system. The request was to change the default dummy picture for users without a personal picture in the profile.
And here is the script:

<script type="text/javascript">
<!--
function swapImages(oldimg,newimg)
{
var n = document.getElementsByTagName("img");
for ( i=0;i<n.length;i++) if (n[i].src==oldimg) n[i].src=newimg;
}
// call at end of html-page or when onload-event fired
swapImages("
http://%YourSite%/oldimg.png","http://%YourSite%/newimage.png");

//-->
</script>


Special thanks to Oliver (http://pixelbrothers.com/ ) helping us to write the script!
 
Simply place the script into the HTML code of a ContentEditor Webpart

Generate a SharePoint list with all user information in Office 365 environment

Involved component:
·         On-premise Active Directory

·         PowerShell

·         Exchange Online

·         SharePoint Online

The given request during a project was to generate an overview list containing all user information in the environment.
The collaboration portal is running on Office 365.  All given user information such as, department, manager, location etc. are based on an import via PowerShell into the Office 365 System.
Because of the synchronization between Exchange Online, and the associated SharePoint Online System the SharePoint User Profile Service also gets that information.  In addition users are able to fill in personalized information like phone number, mobile number, office room number etc. They can do this via SharePoint MySite or they can use Outlook to complete their profiles.
So as a result, we get mostly completed and actual user profiles.
Using that URL call, you get a list of all users in your SharePoint System:
_layouts/people.aspx?MembershipGroupId=0
Based on this we now can create and refine the information and build an employees information Site in SharePoint Online:
In the following basic SharePoint function we can modify the view or bring in some new columns:
First of all I recommend to create a new view and let the system default views as they are.
I created a view called DEMO. You can see that this view will be placed under a different URL:
_catalogs/users/detail.aspx
This is a character of this special system view…
Now I do some additional configuration.
At first I only want to see real users using that filter:
It works, because objects like “NT AUTHORITY\authenticated users” do not have a forename.
In the next step I add a calculated column which I will use for group and filter functionality:
As a result my list will look like this:
Here are some examples what you can do now based on that:
Using the calculated column “_name” you can realize a filter by initial:
Or another example is a filter based on subsidiary map
As you can see all that also works on the new SharePoint 2013 version.
During the project we got the additional request to change the default dummy picture for users without a personal picture. In an on-premise installation this is no problem. You locate and change the picture. Default it is at: “http://%YourSite%/_layouts/images/person.gif”. In Office 365 / SharePoint Online this location is not accessible.
See our solution under: Changing picture inSharePoint Site with JavaScript 

Mittwoch, 17. Oktober 2012