Archive

Posts Tagged ‘Project Server’

Switch to #ProjectServer #Permission mode from #SharePoint permission mode

April 24, 2013 Leave a comment
Challenging part while using new version of any product is to find new location of features/options within new version, if they are no longer available on the same spot as of their former version.

This post will help you to find key feature of Project Server 2013, Security Settings in Project Server 2013, that used to be under server settings of Project Server 2010.

With the introduction to new security mode in Project Server 2013, i.e. :SharePoint Permission mode, your new PWA by default will provision with SharePoint permission mode and hence you will find Security section missing from PWA server settings page.

Advantages, and what is enabled and what is not, while staying with SharePoint security mode are detailed here: http://technet.microsoft.com/en-us/library/fp161361.aspx

Out of the above article, and with R&D i have done so far, the major features you were not be able to use in SharePoint security mode are as follows:

  • Unable to edit default permission of groups
  • RBS
  • categories
  • Delegation
As you are aware that permissions in PS 2010 and PS 2007 was the combination of security groups, categories and RBS. SharePoint security mode helps get rid of this complexity and provide single forum for system admins, i.e. SharePoint groups, to configure permission for PWA as well. 

SharePoint Permission Mode creates SharePoint groups that directly correspond to the default security groups found in Project Permission Mode. These default security groups include the following:
  • Administrator
  • Portfolio Managers
  • Portfolio Viewers
  • Project Managers
  • Resource Managers
  • Team Leads
  • Team Members
I have modified the quick launch in above screen shot to show you all the relevant groups, however you can click on Groups link on the top to access to full list of groups. 
Using of SharePoint security could be beneficial for naive organizations or to those who are willing to run project management business without creating data access layers based on user role defined through RBS. There could be several more reasons of using PWA in SharePoint security mode as well.
The recommended way of adding user to group is still the Active Directory synchronization, available through server settings.

In order to switch the permission mode back to Project mode, use the following windows powershell cmdlet:

Set-SPProjectPermissionMode [-Url] <Uri> [-Mode] <SharePoint | ProjectServer | UninitializedSharePoint | UninitializedProjectServer> [[-AdministratorAccount] <String>] [-AssignmentCollection <SPAssignmentCollection>]

For detail of above cmdlet, see this technet article:: http://technet.microsoft.com/en-us/library/jj219486.aspx

Once the prompt will be back after execution, refresh the PWA server settings page to see the Security group available to be used.

Note that Switching security modes deletes all permissions configuration information for the specified Project Web App instance and reverts to the default settings for the specified mode. You need to be carefully planning this well in advance that which security mode you have to configure.

via All about Enterprise Project Management (EPM) http://khurramjamshed.blogspot.com/2013/04/switch-to-projectserver-permission-mode.html

Khurram Jamshed
The author of the blog has an extensive experience of working as an EPM Consultant. Currently he is located in Dubai, UAE and working for Microsoft partner organization as Project Server specialist. He has a thorough experience of providing Project Management technical/functional consultancy to all sort of organizations. He is a certified PMP, a Project Server MCITP, and also received a MS community contributor award 2011.

This article has been cross posted from khurramjamshed.blogspot.com/ (original article)

#Project #MVP Award #ProjectServer #SharePoint #PS2013# SP2013

April 22, 2013 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

I am very pleased to announce that I was awarded the MVP award for Project in April 2013. I am grateful for such recognition for doing something I really enjoy, helping out fellow Project Server community members. I have been holding off announcing the award as my surname is wrong on the award, it states Paul Mathers instead of Paul Mather. This is something that is being corrected but will take time.

MVP

I look forward to continuing helping out in the Project,Project Server and SharePoint communities. Smile

Categories: Paul Mather, Work Tags:

Sign-in as different user on #SharePoint Server 2013 or #ProjectServer 2013

April 21, 2013 Leave a comment
While browsing/using your new SharePoint Server 2013 web site, one of the evident feature missing you will come across, apart from the other UI changes, is when you trying to log-in as a different user by clicking on top rite corner of the page and found NOTHING 🙂

I have seen on few blog posts that it could be the case with preview version, and in RTM we mite get it back. but i am using RTM now and its the same as of preview version. Your other clue at this stage could be that it might needs to be enabled from some setting options, but for your information that is not true either 🙂
After a little googling i have found that this feature has been removed on purpose by Microsoft from SharePoint server 2013. Although this is pretty much a frequent option to be used by developer/consultants while testing solution, however following are the few reasons explained by Microsoft due to which it has been removed:

  • Caching Problems
  • Documents opened in external applications are saved with an unexpected user account
  • Page content shows information from the previous user due to cached information
  • Session variables contain information from previous user as the cookies are not cleared

As an end user perspective, i agree that its a good move to avoid issues by removing this option since end user do not often requires to switch between log-in user. But as an IT pro, i don’t think i can live without it 🙂 and you can follow the below steps to bring the option back for you:

  • Locate and then open the following file in a text editor:  C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\CONTROLTEMPLATES\welcome.ascx
  • Open the file in Notepad and add the following lines to the file: also see the screen shot for this modification.
<SharePoint:MenuItemTemplate runat=”server” ID=”ID_LoginAsDifferentUser” 
Text=”<%$Resources:wss,personalactions_loginasdifferentuser%>” 
Description=”<%$Resources:wss,personalactions_loginasdifferentuserdescription%>” 
MenuGroupId=”100″ 
Sequence=”100″  UseShortId=”true” /> 
  • As a final step, refresh the page and the option will apparently start appearing for you to be used.
One of the other alternative is to start Internet Explorer as Run as Different User and login to SharePoint site: http://support.microsoft.com/kb/2752600
Note: I came across this while evaluating Project Server 2013 PWA site, however it applies to any SharePoint site and not limited to PWA only because its all SharePoint 🙂  Also as i have mentioned that this option is removed intentionally, so try this on your testing environments prior to apply on production.

via All about Enterprise Project Management (EPM) http://khurramjamshed.blogspot.com/2013/04/sign-in-as-different-user-on-sharepoint.html

Khurram Jamshed
The author of the blog has an extensive experience of working as an EPM Consultant. Currently he is located in Dubai, UAE and working for Microsoft partner organization as Project Server specialist. He has a thorough experience of providing Project Management technical/functional consultancy to all sort of organizations. He is a certified PMP, a Project Server MCITP, and also received a MS community contributor award 2011.

This article has been cross posted from khurramjamshed.blogspot.com/ (original article)

Using Knockout.js in a SharePoint Context

April 21, 2013 2 comments

The excellent Knockout.js library is an MVVM (Model, View, ViewModel) library.

Using it you can completely abstract the logic from the presentation in your web applications, allowing dynamic and responsive UIs to be created without having to manage all of the fiddly UI updates directly.

The Knockout site has a great set of tutorials on how to use it, but I thought I would bring them into a SharePoint context.

Specifically, I am going to cover their 5th tutorial, Loading and Saving Data. In this tutorial they give the example of a simple task list that a user can update and delete dynamically. If you do not know Knockout at all, I recommend you go through this tutorial before continuing. Go ahead, I can wait.

Back with us? Excellent. Hopefully by now you have some idea of the power of Knockout, so lets try and reproduce this using a SharePoint list as the data source.

The first thing to do is to create our list. For this I am using a simple custom list named ‘My Tasks’ with an additional Completed Yes/No field, and I have pre-populated it with some entries.

knockout1

Next we need to consider how we are going to create our view within our site. For my example I have chosen to simply create the view as a file in a document library, then link to it using a Content Editor Web Part. However you could do this a number of ways, you could embed your JavaScript into the master page and put your data bindings directly into a page layout, or you could create a visual web part. The possibilities are endless, this is SharePoint after all! :)

I put the view, along with the script references to Knockout, the ever useful jQuery and my View Model into a single file and save it into the document library. I have also put some style information in too. Here is the view model as I created it:

<style type="text/css">

	#taskContainer {
		width: 500px;
	}
	
	#errorBox {
		text-align: center;
		border: 1px solid #600;
		margin-bottom: 10px;
		padding: 10px;
		background: #f99;
		color: #600;
	}
	
	#saveBox {
		text-align: center;
		border: 1px solid #060;
		margin-bottom: 10px;
		padding: 10px;
		background: #9f9;
		color: #060;
	}
	
	#taskContainer ul {
		padding: 10px;
		background: #eaeaea;
		padding: 0;
	}
	
	#taskContainer ul li {
		list-style: none;
		padding: 3px;
	}
	
	#taskContainer input[type=text] {
		width: 390px;
	}
	
</style>
<div id="taskContainer">
	<h3>Tasks</h3>
	
	<div id="errorBox" data-bind="text: errorMessage, visible: errorMessage"></div>
	<div id="saveBox" data-bind="text: saveMessage, visible: saveMessage"></div>
	
	Add task: <input data-bind="value: newTaskText" placeholder="What needs to be done?"/>
	<button data-bind="click: addTask">Add</button>
	
	<ul id="myTaskBox" data-bind="foreach: tasks, visible: tasks().length > 0">
	    <li>
	        <input type="checkbox" data-bind="checked: Completed" />
	        <input data-bind="value: Title, disable: Completed" />
	        <a href="#" data-bind="click: $parent.removeTask">Delete</a>
	    </li> 
	</ul>
	
	You have <b data-bind="text: incompleteTasks().length">&nbsp;</b> incomplete task(s)
	<span data-bind="visible: incompleteTasks().length == 0"> - it's beer time!</span>
	
	<button data-bind="click: save">Save</button>
</div>

<script type="text/javascript" src="../webdevdocuments/knockout.js"></script>
<script type="text/javascript" src="../webdevdocuments/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="../webdevdocuments/ViewModel.js"></script>

Note the addition of some message boxes, the original tutorial does not include them but I felt they were nicer than simple alert boxes.

Also note that, unlike the original, I have not used a form element for the new task area. This is because form elements can cause havoc in SharePoint pages, as the entire page is wrapped in a form for post-backs.

Other than that, our view is mostly unchanged.

Now, on to the JavaScript!

The main differences here lie in the way that we send and receive data from SharePoint. In their examples they use jQuery to query and post data to REST APIs, and while SharePoint 2010 and 2013 do come with their own suite of REST / oData APIs, there are some issues in using them.

  • Update and Delete calls can only update or delete one item per call, to do the bulk updating this system indicates we would have to make a request per item. Not ideal!
  • Due to the way SharePoint handles concurrency, you have to pass around an eTag so that SharePoint can determine if an item has been updated since requested. While this is great for high concurrency systems with multiple people editing the same data, for a personal tasks list this is not a nice feature.

Luckily REST is not our only option. SharePoint has the wonderful Client Side Object Model (CSOM), which can do all of our loading and saving for us!

Here is my View Model, updated to use the CSOM.

(function() {

	function Task(data) {
	    this.Title = ko.observable(data.Title);
	    this.Completed = ko.observable(data.Completed);
	    
	    // An additional reference to store the SharePoint list item id.
	    this.Id = ko.observable(data.Id);
	}
	
	function TaskListViewModel() {
	    // Data
	    var self = this;
	    self.tasks = ko.observableArray([]);
	    self.newTaskText = ko.observable();
	    
	    // Additional bindings to use for error and saved messages.
	    self.saveMessage = ko.observable(false);
	    self.errorMessage = ko.observable(false);
	    
	    self.incompleteTasks = ko.computed(function() {
	        return ko.utils.arrayFilter(self.tasks(), function(task) { return !task.Completed() && !task._destroy});
	    });
	
	    // Operations
	    self.addTask = function() {
	        self.tasks.push(new Task({ Title: this.newTaskText(), Completed: false, Id: "New" }));
	        self.newTaskText("");
	    };
	    
	    self.removeTask = function(task) {
			self.tasks.destroy(task)
	    };
	    
	    self.save = function() {

	    	for (var task in self.tasks()) {
	    	
	    		var createdTasks = [];
	    		
	    		// Build a request up to send with the CSOM.
	    	
	    		if (self.tasks()[task]._destroy) {
					// Handle deleted objects
	    			// Deleted items that are marked "new" have never been saved to SharePoint to start with,
	    			if (self.tasks()[task].Id() != "New") {
			    		var listItem = taskList.getItemById(self.tasks()[task].Id());
			    		listItem.deleteObject();
	    			}
	    		} else if (self.tasks()[task].Id() == "New") {
	    			// Handle new objects to be created.
	    		
	    			var createInfo = new SP.ListItemCreationInformation();
	    			var listItem = taskList.addItem(createInfo);
	    			
	    			listItem.set_item("Title", self.tasks()[task].Title());
	    			listItem.set_item("Completed", self.tasks()[task].Completed());
	    			
	    			listItem.update();
	    			
	    			// Save a reference to both the SP.ListItem object and the KO Object so we can update
	    			// the latter with the former's ID once the object has been created.
	    			createdTasks.push({
	    				spItem: listItem,
	    				koItem: self.tasks()[task]
	    			});
	    			
	    			ctx.load(listItem);
	    		} else {
	    			// The item is neither new nor deleted, handle it as an update.
	    			var listItem = taskList.getItemById(self.tasks()[task].Id());
	    			
	    			listItem.set_item("Title", self.tasks()[task].Title());
	    			listItem.set_item("Completed", self.tasks()[task].Completed());
	    			
	    			listItem.update();
	    		}
	    		
	    	}

			// Nowe we have built our request, send it to the server for processing.	    	
	    	ctx.executeQueryAsync(function() {
	    	
	    		// Our save was successful. Now we need to itterate through our newly
	    		// created items and ensure that Knockout knows that the ID has changed.
	    		for(var item in createdTasks) {
	    			createdTasks[item].koItem.Id(createdTasks[item].spItem.get_id());
	    		}
	    		
	    		// Set our saved message.
	    		self.saveMessage("Saved successfully");
	    		
	    	}, function(sender, args) {
	    	
	    		// Our save failed, set the error message to show then log the actual error
	    		// to the JavaScript console if it exists.
	    		self.errorMessage("Error updating list items");
	    		if (typeof console != "undefined") {
	    			console.log(args.get_message());
	    		}
	    	});
	    	
	    };
	    
	    // Load the data from SharePoint
		// Get a context to the current site.
	    var ctx = new SP.ClientContext(_spPageContextInfo.webServerRelativeUrl);
	    
	    var web = ctx.get_web();
	    var taskList = web.get_lists().getByTitle("My Tasks");
	    
	    // Limit our task list to 50 tasks.
   	    var query = new SP.CamlQuery();
   	    query.set_viewXml("<View><RowLimit>50</RowLimit></View>");
   	    
   	    var taskItems = taskList.getItems(query);
   	    
   	    // Ensure the fields we want to retrieve are returned
   	    ctx.load(taskItems, "Include(ID,Title,Completed)");
   	    
   	    // Send our query to the server for processing.
   	    ctx.executeQueryAsync(function() {
   	    	var tasks = [];
   	    	var taskItemEnumerator = taskItems.getEnumerator();
   	    	
   	    	// Iterate through our retrieved data set and build an array of JSON objects containing
   	    	// the relevent properties.
   	    	while (taskItemEnumerator.moveNext()) {
   	    		tasks.push(
   	    			new Task({
	   	    			Title: taskItemEnumerator.get_current().get_item("Title"),
	   	    			Completed: taskItemEnumerator.get_current().get_item("Completed"),
	   	    			Id: taskItemEnumerator.get_current().get_item("ID")
	   	    		})
	   	    	);
   	    	}
   	    	
   	    	// Update the Knockout tasks array with our data from the server.
   	    	self.tasks(tasks);
   	    });
	    
	}
	
	
	$(document).ready(function() { // I use jQuery for this, but you could add an event listener to the document object instead.
		EnsureScriptFunc("sp.js", "SP.ClientContext", function() {
			ko.applyBindings(new TaskListViewModel());
		});
	});

})();

So there you go, once you put it all together you should end up with something looking like this:

knockout2

Cool, huh? It is by no means perfect. The two biggest issues with the implementation as it stands are:

  • Currently I am limiting the entire system to only showing 50 records, which is not ideal. This would be best handled by adding some pagination.
  • When you hit save it updates every item in the view model, regardless of whether it needs updating or not. This would be resolvable by subscribing to the Task Knockout object and keeping track of which need updating and which do not.

Additionally you could use some jQuery animation and the animated transitions example on the Knockout site to hide the save and error boxes once they are shown. Currently once they are visible they remain visible indefinitely.

Have fun with it, it’s a neat tool and can give quite powerful results.

via Chris on SharePoint http://spchris.com/2013/04/using-knockout-js-in-a-sharepoint-context/

Chris Stretton
SharePoint and Project Server Consultant

  • MCITP – SharePoint Administrator 2010
  • MCTS – Microsoft Project 2010 – Managing Projects, Project Server 2010, Configuration, SharePoint 2010, Configuration
  • Prince 2 – Practitioner

This article has been cross posted from spchris.com (original article)

Mastering the SharePoint 2013 Suite Bar

April 20, 2013 Leave a comment

Today I had a requirement to alter the title in the left hand side of the Suite bar in SharePoint 2013.

This is the bar appearing at the very top of the page, by default containing the word SharePoint on the left and links to things like SkyDrive, the Newsfeed and sites you follow on the right.

suitebar1

In this particular scenario I was interested in changing the word SharePoint to something more meaningful, preferably customisable on a per web basis, or based upon the site collection root web’s title.

My first thought on trying to change it was to look into the master page but I could find no reference to it there, so I did a little digging and found some surprising details.

  1. The entire bar is a delegate control
  2. The left hand part of the bar is stored as a property against the Web Application
  3. There is no way of modifying the right hand links without writing a farm solution in .NET, or adding custom JavaScript to each page to modify the links on the fly.

While these problems are not insurmountable, it left me a little nonplussed, especially the idea that it was not possible to modify the branding uniquely per site collection or per web. However I bravely fought on, as I was really quite determined to get that heading working the way I wished.

My first test was to see what the property against the web application was called, and what it contains by default. Let’s break out our trusty SharePoint Management Console and use the following bit of PowerShell.

$webApp = Get-SPWebApplication -Identity "http://mywebapplicationurl"
$webApp.SuiteBarBrandingElementHtml
<div class="ms-core-brandingText">SharePoint</div>

This seems straight forward enough, the property is a string containing the HTML for the heading, so let’s go and update it to something else using the same window from our previous example (Re-do the Get-SPWebApplication call again if you have closed it)

$webApp.SuiteBarBrandingElementHtml = '<div class="ms-core-brandingText">My Custom Branding</div>'
$webApp.Update()

Note the call to the Update() method, without this your changes will not be applied to the Web Application.

Once done, refresh your page and you will see that your branding has updated accordingly.

suitebar2

So to recap, we can modify this string only on the Web application level, but when we do so, we can put HTML tags in directly, and they will be rendered to the page. Interesting!

Let’s talk about JavaScript

The ECMAScript Object Model first came into its own with SharePoint 2010, and with 2013 has gone from strength to strength. Lets see if we can’t use it to meet our requirement of at least customising the Suite bar based on the current Site Collection’s root web title.

To do this is very simple in code, take a look at the following JavaScript example:

(function() {

	// Set a default title to use if we cannot retrieve one.
	var defaultTitle = 'SharePoint';

	// Ensure that both the DOM and the Object Model are ready for us
	document.addEventListener('DOMContentLoaded', function() {
		EnsureScriptFunc('sp.js', 'SP.ClientContext', function() {

			// Instantiate our renamer.
			var t = new titleBarRenamer();

		});
	});


	function titleBarRenamer() {

		// Get and load a reference to the root web of the current site collection.
		var ctx = new SP.ClientContext.get_current();
		var site = ctx.get_site();
		var rootWeb = site.get_rootWeb();

		ctx.load(rootWeb);

		// Send our query off to SharePoint.
		ctx.executeQueryAsync(function() {

			var title = false;

			// Pull the title into a variable.
			// Default to the default title if it fails.

			try {

				title = rootWeb.get_title();

				title = title || defaultTitle;

			} catch (e) {

				title = defaultTitle;

			}

			// Update our title to our results.
			document.getElementById('webTitleContainer').innerHTML = title;

		}, function() {

			// If all else fails, set the title back to our default.
			document.getElementById('webTitleContainer').innerHTML = defaultTitle;

		});
	
	}

})();

That’s cool, wherever this code is run it will set an HTML element with an ID of ‘webTitleContainer’ to the root web’s title.

Putting it all together

So how do we combine these two together?

Again this is pretty simple, take a look at the following PowerShell:

Add-PSSnapIn Microsoft.SharePoint.PowerShell

$containerCode = @"
<div id='webTitleContainer' class='ms-core-brandingText'></div>
<script type='text/javascript'>
(function() {

	// Set a default title to use if we cannot retrieve one.
	var defaultTitle = 'SharePoint';

	// Ensure that both the DOM and the Object Model are ready for us
	document.addEventListener('DOMContentLoaded', function() {
		EnsureScriptFunc('sp.js', 'SP.ClientContext', function() {

			// Instantiate our renamer.
			var t = new titleBarRenamer();

		});
	});


	function titleBarRenamer() {

		// Get and load a reference to the root web of the current site collection.
		var ctx = new SP.ClientContext.get_current();
		var site = ctx.get_site();
		var rootWeb = site.get_rootWeb();

		ctx.load(rootWeb);

		// Send our query off to SharePoint.
		ctx.executeQueryAsync(function() {

			var title = false;

			// Pull the title into a variable.
			// Default to the default title if it fails.

			try {

				title = rootWeb.get_title();

				title = title || defaultTitle;

			} catch (e) {

				title = defaultTitle;

			}

			// Update our title to our results.
			document.getElementById('webTitleContainer').innerHTML = title;

		}, function() {

			// If all else fails, set the title back to our default.
			document.getElementById('webTitleContainer').innerHTML = defaultTitle;

		});
	
	}

})();
</script>
"@

$webApp = Get-SPWebApplication -Identity "http://mywebapplicationurl"
$webApp.SuiteBarBrandingElementHtml = $containerCode
$webApp.Update()

As you can see, the bulk of this is our JavaScript code from above, with the addition of a div for our title to end up in and the required script tags for the code.

Once you have this, you can save it as a .ps1 file and execute it in PowerShell. You may need to set the execution policy to RemoteSigned before you are able to do this.

And there you go. You could do some fairly interesting things with this, particularly as it takes effect right across the entire web application. You also have to be aware that this is stored within the Configuration Database rather than the Content Database, so will not be migrated if you move content databases from one farm to another.

via Chris on SharePoint http://spchris.com/2013/04/mastering-the-sharepoint-2013-suite-bar/

Chris Stretton
SharePoint and Project Server Consultant

  • MCITP – SharePoint Administrator 2010
  • MCTS – Microsoft Project 2010 – Managing Projects, Project Server 2010, Configuration, SharePoint 2010, Configuration
  • Prince 2 – Practitioner

This article has been cross posted from spchris.com (original article)

#ProjectServer 2013 ribbon in different browsers with different zoom levels #PS2013 #SP2013

April 18, 2013 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

A quick post just to highlight how different browsers will render the ribbon differently based on the zoom level of the session. Some examples below to show the differences between IE 9 and Chrome version 26. At the default 100% all browsers render the ribbon identically. All pages / ribbons are affected.

IE 9 – Tasks Page – 125% zoom:

image

Chrome – Tasks Page – 125% zoom:

image

Notice the buttons are all grouped together.

What is interesting is if you increase the zoom to 150% in Chrome the buttons are no longer grouped:

image

Just something to be aware of if you have a user who raises this. Ask them to press Ctrl and 0 to set the zoom to the default 100% and the buttons should appear as normal on the ribbons.

Categories: Paul Mather, Work Tags:

SharePoint Evolution Conference–things to remember / learn

April 18, 2013 Leave a comment

 

So today was the last of the 3 day Evolution conference that has been running at the QEII centre in Westminster. http://www.sharepointevolutionconference.com/ 

 

The whole conference has been fantastic with a very good selection of speakers

My highlights were Andrew Connell’s (http://www.andrewconnell.com/blog) Talk on single page applications or SPA’s. I am sure this will appear on his blog soon

the other was Chris O’Brien’s (http://www.sharepointnutsandbolts.com) talk on SharePoint App’s and why they make a lot of sense. He did a mock conversation, which i have gone through myself, on how SharePoint hosted apps are not powerful enough and we want to use c# in a provider hosted app which then leads down the rabbit whole of either Azure costs or the maintenance and DR of our own server. This all leads back to the question “What was wrong with SharePoint hosted apps anyway?”

 

The big take away from the conference was that there is not that much you cannot do with SharePoint hosted app if you really think about it. So we need to get outside of our nice comfy C# sofa and start learning JavaScript.

 

By this I mean REALLY learn JavaScript and not the hacking about we have been doing for the last few years. This means that we need to treat JavaScript as a real language (I realise that it is) and write the code properly using proper patterns. So that when we look at it all in a weeks time or have to show it in a demo it will make sense and that other people can actually support the code.

 

This seems daunting given the limited tooling that exists for JavaScript, especially when we think how lucky we are with the debugging tools we get for .NET code.

 

Someone, I forget who, came up with a brilliant analogy for what JavaScript is and it was “JavaScript is assembly language for the web”

When you think about it this makes a lot of sense. In the end the C# code we write is assembly when it finally gets executed.

 

This means that to write good JavaScript we need to use extra tools and frameworks that other people have provided.

 

The obvious one is jQuery which i now think is synonymous with JavaScript. If you are not using jQuery in you JS then you are just making life difficult.

 

The other frameworks that we should look to use and the main reason for this post are the following:

 

Using some or all of the above does make the learning a little more daunting but after seeing the results this is clearly the way to move forward. When you see how little code you actually have to write it is just amazing what can be done.

 

As well as the extra frameworks the other key JavaScript things to learn are namespaces and promises

 

Something else to note. Make sure you have the latest version of the SharePoint development tools installed and make sure you have the “Web Essentials 2012” extension installed as well. This will make life easier.

 

Please do not ask me for any code samples or video’s of the event as I do not have any and if I did I wouldn’t be allowed anyway.

via Buzz Blog http://paulbuzzblog.wordpress.com/2013/04/18/sharepoint-evolution-conferencethings-to-remember-learn/

Chris Stretton
Paul is a an expert SharePoint and Project Server developer and is responsible for designing and implementing custom solutions on client systems using the latest SharePoint and .NET technologies.
Paul has extensive experience with SharePoint systems across all sizes of implementation, ranging from small to large farms and has an excellent understanding of all the elements of SharePoint.

This article has been cross posted from paulbuzzblog.wordpress.com (original article)

ForeFront Identify Manager Client

April 16, 2013 1 comment

The User Profile Service is an incredibly powerful part of SharePoint. When used correctly it vastly improves the experience of your users by adding a real sense of personal ownership of your sites and their content.

Unfortunately like any complex system, identifying and fixing issues can be a painful process. There is minimal information provided in the site and almost none regarding the connection between the service and Active Directory.

In SharePoint 2010, the user profile sync is controlled by the ForeFront Identity Manager service, this is a Windows service that handles the connections between Active Directory, any BDC connections defined and the SharePoint site collections and sites.

The workings of the service are somewhat impenetrable, but if you wish to see what it is doing and follow the sync process, it comes with a nice GUI interface.

This can be run directly on the server from the path X:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe

When running during a sync you can see any issues encountered such as permissions problems.

via Chris on SharePoint http://spchris.com/2013/04/forefront-identify-manager-client/

Chris Stretton
SharePoint and Project Server Consultant

  • MCITP – SharePoint Administrator 2010
  • MCTS – Microsoft Project 2010 – Managing Projects, Project Server 2010, Configuration, SharePoint 2010, Configuration
  • Prince 2 – Practitioner

This article has been cross posted from spchris.com (original article)

#ProjectServer and #SharePoint 2010 / 2013 April 2013 Cumulative Update #PS2010 #SP2010 #PS2013 #SP2013 #MSProject

April 15, 2013 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

The Office 2013 April 2013 Cumulative Updates are now available, please see the links below:

http://support.microsoft.com/kb/2832224

Project Server 2013 Server Roll up package April 2013 CU (Recommended):
(Delayed)
Project Server 2013 April 2013 CU (Included in the Server Roll up package): 
http://support.microsoft.com/kb/2760261
Project 2013 April 2013 CU:
http://support.microsoft.com/kb/2768336

Also worth noting, install the March 2013 Public update: http://support.microsoft.com/kb/2768001 if installing the April 2013 CU.

The Office 2010 April 2013 Cumulative Updates are now available, please see the links below:

http://support.microsoft.com/kb/2832226

Project Server 2010 Server Roll up package April 2013 CU (Recommended):
http://support.microsoft.com/kb/2775426
Project Server 2010 April 2013 CU (Included in the Server Roll up package):
http://support.microsoft.com/kb/2791064 & http://support.microsoft.com/kb/2760780
Project 2010 April 2013 CU:
http://support.microsoft.com/kb/2794664
Remember SP1 is a pre-requisite for the Office 2010 April 2013 CUs.
For more details please see:

http://blogs.technet.com/b/projectsupport/archive/2013/04/11/microsoft-project-server-2007-2010-and-2013-april-2013-cu-announcement.aspx
As always, test these updates on a replica test environment before deploying to production

Categories: Paul Mather, Work Tags:

Adding a default image for remote served images

April 15, 2013 Leave a comment

Quite often when working with data within a SharePoint environment, we wish to link the data to images hosted within a third party system.

This is often seen in the form of staff pictures that are hosted on a third party HR platform rather than within Active Directory, so the User Profile service images are of no use to us.

Unfortunately there is no real way of detecting if the image on the third party system actually exists, which means that rather than seeing the nice friendly missing profile image, you get a horrible missing image box.

This can be overcome with some simple JavaScript:

(function(){

    var defaultImage = "/_layouts/15/images/PersonPlaceholder.200x150x32.png";

    var profileImage = document.createElement("img");

    // Define an error handler, this will fire if there is an
    // error loading the URL for the staff image and redirect
    // it to the missing user profile image in the hive.

    profileImage.onError = function() {

        this.src = defaultImage;

    }

    // Point the image element to our staff images then attach
    // it to the DOM.

    profileImage.src = "http://hr/staffimages/" + employeeId + ".png";

    // Note that the employeeId variable referenced above is to be
    // provided externally and is beyond the scope of this post.

    var container = document.getElementById("profileImageContainer");

    if (container) {
        container.appendChild(profileImage);
    }
})();

With this code in place any missing images will automatically serve the default image instead.

This method will work anywhere you need to serve images and have no way of detecting if the image to be served exists or not.

Chris Stretton
SharePoint and Project Server Consultant

  • MCITP – SharePoint Administrator 2010
  • MCTS – Microsoft Project 2010 – Managing Projects, Project Server 2010, Configuration, SharePoint 2010, Configuration
  • Prince 2 – Practitioner

This article has been cross posted from spchris.com (original article)

Design a site like this with WordPress.com
Get started