Archive

Archive for the ‘Paul Busby’ Category

Custom Navigation in a SharePoint Hosted App in SharePoint 2013

February 10, 2013 1 comment

 

I have been playing round with a SharePoint hosted app to learn about how it all works. This has been going well but i ran into more problems than i though i would when trying to implement a menu for my App.

 

If you are using the auto hosted or developer hosted app model then this is easy (ish) you use the new chrome control, create you menu links in JS and you are done. MS have some documentation on this that works great.

 

But i am creating a SharePoint hosted app. So this causes a few “problems”. The first one being that if i add a chrome control to my page i get 2 menu which is just silly.

 

Google wasn’t much help although i did find this post here

http://www.intrateam.com/gb/blogpost/sharepoint-2013-app-master-page

which pointed me in the right direction.

 

My first issue was actually getting hold of a copy of the master page that app’s use. I could not work out how to do this only having an office 365 tenant. In the end I grabbed the app.master and default.master from the GLOBAL folder in the hive on a on premise install.

 

The first thing i worked out is that the reference to “~masterurl/default.master”  seems to translate to the app.master from the GLOBAL folder in the HIVE.

 

So i made a copy of the app.master and added it to my project. Changing the elements.xml file as per the post linked above.

 

I also changed the link in my ASPX pages from ~masterurl/default.master to ~site/_catalogs/masterpage/<Name of my master page>.master

 

This assumes you have you elements file setup like

elementsfile

 

 

While doing this I noticed that there is a content place holder with an id of PlaceHolderLeftNavBar. This isn’t hidden.

 

So I added

image

into my Default.aspx page and loaded it into SharePoint.

menu

 

Bingo I have a menu in the standard place in SharePoint. What is also nice is that if the user hits the “Focus on Content” button then the menu gets hidden.

 

But wait a minute we just setup our own master page, what was the point? Well at the moment you do not need you own master page but this does now mean you could move any of the other Content Place Holders to put a menu in a different location. It also helps get rid of some of the warnings in visual studio as it now knows the master you are using.

 

I do have an issue that  have to copy my <asp:menu> content onto all the pages. I tried using the XML data source but this appears to not be supported but there may be another way to store the menu logic centrally.

 

The next problem to solve was that we need to pass the query string values around the system, so these have to be added to the menu.

This can be done with some simple jQuery.

 

image

 

Just make sure this will run on all of the pages and your querystring values will be maintained between page loads

Sorry for the images but my code plugin was not working.

Hope this helps someone.

via Buzz Blog http://paulbuzzblog.wordpress.com/2013/02/10/custom-navigation-in-a-sharepoint-hosted-app-in-sharepoint-2013/

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)

Visual Studio 2012 templates for SharePoint 2013

January 23, 2013 Leave a comment

 

So I just fired up Visual Studio 2012 and went to create a new SharePoint 2013 App just to play around with. Only to find that Visual Studio only has the 2010 templates available.

 

The search to find out what I needed to install wasn’t as quick and simple as I was hoping so now that I have worked it all out i may as well share with the rest of you.

 

Assuming you have Visual Studio 2012 installed. Go to

http://msdn.microsoft.com/en-us/office/apps/fp123627

 

Scroll down and under the tools section there is a web downloader (Direct Link). Download and run it, it will download everything you are missing.

 

After a couple of restarts you can then create 2013 projects in visual studio

image

Hope that helps

via Buzz Blog http://paulbuzzblog.wordpress.com/2013/01/23/visual-studio-2012-templates-for-sharepoint-2013/

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)

Building a Project Server app

December 13, 2012 Leave a comment

 

EPMSource have just finished a very nice 4 / 5 part series on how to create an app for Project Online. It even walks through the submission process to the app store.

 

Here are the direct links to each post

Post 0

Building your first Project Server app – Part Zero–The introduction

Post 1

Building your first Project Server app – Part 1 – Getting Started – Setting up a development env

Post 2

Building your first Project Server app – Part 2 – Getting the basic app up and running

Post 3

Building your first Project Server app – Part 3 – Taking the app to the next level

Post 4

Building your first Project Server App – Part 4 – Submitting to the app store

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/12/13/building-a-project-server-app/

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)

Getting changed field values from SPItemEventReceiver

November 26, 2012 Leave a comment

 

http://www.thedotnotcorner.com/2012/11/26/helper-methods-for-getting-the-changed-field-value-in-spitemeventreceiver/

has written a very interesting looking helper function for getting old values out of events.

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/11/26/getting-changed-field-values-from-spitemeventreceiver/

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)

Creating a Project Server 2013 App

November 26, 2012 Leave a comment

 

The first in a series of posts about creating a Project Server app.

http://epmsource.com/2012/11/23/building-your-first-project-server-app-part-1-getting-started-setting-up-a-development-environment/

 

This will be interesting.

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/11/26/creating-a-project-server-2013-app/

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)

Technorati: YK3CCGWXYEC9

Service descriptions for SharePoint 2013

November 26, 2012 Leave a comment

 

This post here http://modery.net/new-service-descriptions-for-office-365-wave-15/

has a list of all the services in SharePoint 2013 and what version they are available in.

 

The interesting one for me is that SSRS is available in the E3 and E4 Office 365 plans. Not seen anything about that and I am interested as to how it will work.

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/11/26/service-descriptions-for-sharepoint-2013/

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)

How to hide the SharePoint ribbon

November 23, 2012 3 comments

 

Here is a quick post to show you how you can hide the SharePoint ribbon on a page using JavaScript. This was created by one of my colleagues so I am not sure of why the ribbon needed to be hidden but here is how.

 

function hideEditRibbon() {
var ribbon = SP.Ribbon.PageManager.get_instance().get_ribbon();
// Set the tab to the “Browse” tab
SelectRibbonTab("Ribbon.Read", true);
// Remove the “Edit” tab from a list from from the ribbon.
ribbon.removeChild('Ribbon.ListForm.Edit');
}

SP.SOD.executeOrDelayUntilScriptLoaded(function() {

var pm = SP.Ribbon.PageManager.get_instance();

pm.add_ribbonInited(function() {
hideEditRibbon();
});

var ribbon = null;
try {
ribbon = pm.get_ribbon();
}
catch (e) { }

if (!ribbon) {
if (typeof(_ribbonStartInit) == "function")
_ribbonStartInit(_ribbon.initialTabId, false, null);
}
else {
hideEditRibbon();
}
},
"sp.ribbon.js");

 

Just add this code to a page using the content editor web part and it will work.

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/11/23/how-to-hide-the-sharepoint-ribbon/

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)

SharePoint 2013 Technical Preview Development Environment

October 8, 2012 1 comment

 

Just a straight copy from the original post here http://blogs.msdn.com/b/uksharepoint/archive/2012/10/05/sharepoint-2013-technical-preview-development-environment-dependencies-versions-downloads.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+UkSharepoint+%28UK+SharePoint+Team+Blog%29

 

I have worked with various incarnations of pre-release software installed on development machines. Getting the right combination of tools and versions isn’t very straightforward. If you ever wondered which version of Windows Server 2012, Visual Studio 2012, Office Developer Tools and other Add-ons to install (and from where) read on.

Release Previews

RTMs

Cloud ;-)

The obvious golden rule is not to mix RC and RTM versions of Windows Server, Visual Studio and SharePoint Developer Tools. Choose one and then stick to it. And please don’t underestimate the Cloud option. It is great if you want to try out the new Apps model and you are not that keen on setting up the Infrastructure, App domains or have enough HW to run VMs. Everything is set up for you in the cloud!

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/10/08/sharepoint-2013-technical-preview-development-environment/

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)

SharePoint 2013 certifications

September 17, 2012 Leave a comment

 

Not posted in a while and this is a very short post.

the post here http://jussionsharepoint.com/index.php/2012/09/14/the-definitive-guide-to-sharepoint-2013-certifications/

has an overview of some of the new exams for SharePoint 2013

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/09/17/sharepoint-2013-certifications/

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)

Error when accessing ServiceJobDefinitions.aspx page from Central Admin

August 24, 2012 Leave a comment

 

So i went to manage a timer job and was presented with the following screen.

image

 

The ULS logs didn’t reveal too much information other than a nullreference exception.

There is however some more information in the widows application event log

There was an exception loading job definition "Microsoft.Office.Project.Server.Administration.ServerScheduledTimerJob" (id "48a2075b-37ac-4866-b498-997374621326"). Object reference not set to an instance of an object.

 

 

image

 

To fix the issue some PowerShell is needed to remove the job.

 

Run the following PowerShell script

$job = Get-SPTimerJob <guid of job>
$job.Delete()

 

The job definitions pages now loads Smile

via Buzz Blog http://paulbuzzblog.wordpress.com/2012/08/24/error-when-accessing-servicejobdefinitions-aspx-page-from-central-admin/

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)

%d bloggers like this: