Wednesday 2 December 2015

SharePoint 2013: Set Default Values Enterprise Keywords

SharePoint 2013: Set Default Values Enterprise Keywords

We will create a Document Library:

Then we add two new columns. One Enterprise Keyword column and later a self-managed metadata column.




Now we modify the default view for AllItems.aspx to visualize the default values effect.


The result looks like this:

The standard behavior is that only Name, Modified and Modified by are filled by default.

Now we create a simple folder:

The result looks like this:

Now we choose the option “change default column values”. In the Settings page for default values we will see our Document Library folder structure:

Navigate to the folder where we will set default values:

Now just click on the column you want to set a default value. See the samples:


The result looks like this:

Now we are able to add a document by dragging and dropping into out folder with default settings:

After uploading is finished, we see that our document have the default values adopted.

So what do you expect if you will change the default settings? Just try it.

Now we have an additional Default Value for the column Enterprise Keywords.

First, we will have a look what will happen when an item changed after the Default Settings are changed. Therefore we Check Out our sample document and Check In again.


This update of the item have no effect on the Enterprise Keywords. The new default values are not published to a changed item.

So we will try it with a new document.

As you can see, the Default Settings for the folder only works for new items.

SharePoint : Resource File Deployment

SharePoint : Resource File Deployment

 
Deployment of resource files with SharePoint has always been a little tricky. With MOSS we used features to provision resource files. With SharePoint 2010 it was a little easier but not enough.
There are blogs with some ideas how to make it easier to deploy resources in multiple Locations  They did not anyways fill all my requirements.
I do not want to:
1. Use feature to deploy resources
2. Keep two copies of the same resource file in the project
3. Edit the manifest.xml in visual studio.
4. To have “Resources” subfolder inside App_GlobalResources folder.
With the help of the blog post above, I managed to create solution where you only keep one copy of the resource file and that it is easy to manage and easy to deploy to the whole farm.
Add a mappedfolder to your project and point it to 14\Resources folder. Then add your custom resource file(s) to it:

Add a Empty Element to your project and name it App_GlobalResources:

Delete the feature it created automatically, you will not need it:

Delete the Elements.xml file it automatically created, you will not need that:

Edit the SharePointProjectItem.spdata file inside the App_GlobalResources folder (If you cannot see it, press “Show All Files” button from the Solution Explorer). Replace the empty
<Files />
node with the following xml, with your own path and file name:
  <Files >
    <ProjectItemFile Source="..\Resources\EasyResource.en-US.resx" Type="AppGlobalResource"/>
    <ProjectItemFile Source="..\Resources\EasyResource.fi-FI.resx" Type="AppGlobalResource"/>
    <ProjectItemFile Source="..\Resources\EasyResource.resx" Type="AppGlobalResource"/>
  </Files>
If you add new resource files later remember to update this file too.

Double click the Package folder and add the App_GlobalResource item to the Package:

Build and deploy, all resource files will be deployed to 14Hive and WebApplication.
14Hive:

WebApplication:

When editing the resource files, just a normal Update-SPSolution command with PowerShell will update the resources to the whole Farm. I hope this helps someone struggling with the manual copies or other hacks with deployment of resource files.

Ref: http://www.sharepointblues.com/2012/05/28/sharepoint-2010-resource-file-deployment-done-easy/

Wednesday 25 November 2015

Setting up My Sites in SharePoint 2013


This article describes step-by-step process of setting up the my site infrastructure in the SharePoint Farm.
Prerequisite for setting up My Sites is having user profiles import or sync up and running. You can read more on user profiles sync in my previous article.
When this has been configured, we can start configuring my sites:
The first step us to go create (according to the best practices) own web application for hosting my sites. Go to the central administration, Application management, “Manage web applications”
01
And create a dedicated web application (sd2013:101 in my example here)
02
Now, the next step would be to create a site collection in the root of the newly created web application. You can of course create it inside some other managed path other than root, but since we have dedicated Web Application, root seems like an obvious choice.
Site Collection must have “2013” experience and use “My Site Host” template.
03
After Site Collection has been created, click on the “Managed Paths”  in the web application that you created to host My Sites.
04
Add a new managed path with wildcard inclusion. I prefer to use “my” as the My Site managed path, but you can of course pick up anything else.
05
The next thing is to check service connections for the Web Application which will host my sites. Click on the “Service Connections” button to…
06
..see if right service applications are set up.
If you choose “Custom” (instead of the “Default”) in the Edit the following group of connections drop down, select any service applications to which you want to connect the web application. The most important ones re User Profile service application, the managed metadata service application, and the Search service application.
In my case, I’ll just proceed with “default”
07
Now it’s time to set up the self service site creation. Go back to the Web application management, chose the application that you created to host My Sites, and click on the “Self Service Site Creation” button.
08
Click “On” in the “Site Collections” radio box, and enter your managed path in the “Start a Site” field (with “Prompt users to create a team site under” chosen)
09
Now, the next step is to grant users permission to create new site collections (for my sites). Click on the “Permission Policy” button in the Web Application management, with the web application which hosts the my sites selected.
10
In the”Manage Permission Policy Levels”, click on the “Add Permission Policy Level”
11
Call it however you want (“MySite Subsite Creation” in my case), and grant the “Create Subsites” permission.
12
Now, the new permission policy level should appear among other policy levels…
13
And we need to grant that policy level to the users. Click on the “Users Policy” button in the Web Application management, with the web application that you created to host My Sites selected…
14
Click on the “Add users” link…
15
From all zones…
16
And select the users which you want to have rights to create my sites. On my case, it will be “Everyone”.
17
18
Select your newly created policy level…
19
And now you should see “Everyone” with the new policy selected.
20
OK, everything has been set up and prepared so far. Now, finally, let’s set up the my sites. Go to the Central Administration –> Application Management, and select “Manage service applications”.
21
Then select the “User Profile Service Application”
22
In the “User Profile Service Application”, click on “Setup My Sites”
23
This is where you need to set up the search center, my host location (in my case – root site collection of the Web Application that serves as the host) and personal site location (managed path within the host web application – “my” in my case). Take a look at the screenshot for all the other fields (which I have used in my case):
24
The only remaining thing would be to set up the timer job for activity feed. Go to the Central Administration –> Monitoring –>Timer Job –> Review job definitions
25
Find the “User Profile Service Application – Activity Feed Job”, and set up the activity feed sync timer according to your needs.
26
timer
And, that’s it.
Go to the my site now, and you will be notified of my site creation for your self. Take care of your profile, follow people. Upload you private documents, share documents, follow documents – enjoy being social! Smile
27
28
29

Ref: http://blog.sharedove.com/adisjugo/index.php/2012/07/25/visual-guide-setting-up-my-sites-in-sharepoint-2013/