Archive

Author Archive

Add a column to a Enterprise Wiki Page Layout in SharePoint 2010

March 21, 2013 Leave a comment

After you have create your Enterprise Wiki, you might have a need to add additional fields. For instance, your client might want a summary field on the wiki page. In this case you will need to modify the Enterprise Wiki Page Layout. The video shows you how. Keep in mind that it’s not always a good idea to modify the Enterprise Wiki Page Layout. Instead it might be better to make a copy of the Enterprise Wiki Page Layout and modify that instead. If anything goes wrong with the copy and can simply start over.

Other helpful links:
Modifying the Page Layout for Enterprise Wiki Pages in SharePoint 2010
How to Create WIKI Custom Page Layout & Rich Text Control inside Your Page Layout?

SharePoint 2013 web services: View JSON results via Firefox

March 20, 2013 Leave a comment

If you are working with SharePoint Designer 2013 workflow action “Call HTTP Web Service” then you might know that return results in JSON via accept header is important. But what if you want to view the JSON results in the browser? It would be helpful to see the data you are about to consume. The video below will demonstrate how to do that in Firefox. I don’t know how it is done in Chrome or IE (The video has no audio)

Other helpful links:

The Accept Header

SharePoint Designer 2013 Workflow error: The HTTP header ACCEPT is missing or its value is invalid

SharePoint Designer 2013 workflow action “Call HTTP Web Service”

Customizing the Refinement Panel web part in SharePoint 2010

March 19, 2013 Leave a comment

Part 1:

Summary:

We created our own results page: Results.aspx

We can modify the “Refinement Panel Web Part” only if we can edit the create a new .aspx results page and change the “Search Setting” to point to the new Results.aspx page instead of the default: 00SSearchResults.aspx

 

Part 2:

Now that you can edit the “Refinement Panel Web Part”. You might also want to customize which refiner’s appear in the web part. This video will show you how to edit the XML.

 

Other helpful links:

Category [Refinement]

SharePoint: Add a Filter in the Refinement Panel of the Search Page

Creating an Enterprise Wiki via Central Administration

Modifying the Page Layout for Enterprise Wiki Pages in SharePoint 2010

SharePoint Designer 2013 workflow action “Call HTTP Web Service”

SharePoint Designer 2013 workflow action “Call HTTP Web Service”

March 5, 2013 1 comment

Part 1

In this first section we will start creating our SharePoint Designer 2013 workflow. Our focus here is the “Call HTTP Web Service” action. We will be using and Ebay web service for this example. The response from the web service is in JSON (See image below). The “Call HTTP Web Service” workflow action would be useless without the new “Dictionary” workflow action.

Part 2:

In this section we will be taking the workflow a bit further.

1. We will extract the “Title” and “DealURL” data from the JSON response.

2. We will then create and entry in the WebServiceList for each node in our JSON response ( 7 in total )

Reference:

http://blogs.msdn.com/b/sharepointdesigner/archive/2012/09/05/how-to-work-with-web-service-using-call-http-web-service-action.aspx

Getting the logged on user name using the client object model

February 19, 2013 Leave a comment

If you want to use the SharePoint 2010 client object model you can use the code below:

ExecuteOrDelayUntilScriptLoaded(getWebUserData, “sp.js“);

    var context = null;

    var web = null;

    var currentUser = null; 



        function getWebUserData() { 

        context = new SP.ClientContext.get_current();

        web = context.get_web();

        currentUser = web.get_currentUser();

        currentUser.retrieve();

        context.load(web);

        context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod), 

             Function.createDelegate(this, this.onFailureMethod));

   }



    function onSuccessMethod(sender, args) {

        var userObject = web.get_currentUser();

        var UserTitle = userObject.get_title();

        alert(UserTitle);

        }



    function onFailureMethod(sender, args) {

        alert(‘request failed ‘);

    }





Here is a video and a simple way to test it.

Enable Mobile Browser View for SharePoint Online public site

February 19, 2013 2 comments

So you upgraded to SharePoint Online 2013. If you are like me, you might have been looking on your SharePoint Online public site for the mobile “Contemporary view“. However, you will NOT find it. “Manage Site Feature” does not exist in a public site.

You can use the mobile Contemporary view for your SharePoint Online private site collection. First you will need to enable the feature via Site Settings > Manage Site Features > Mobile Browser View.


The right image is the standard view. The image on the left is the mobile contemporary view.

Categories: Work

SP.ClientContext.get_current is null or not an object

February 5, 2013 Leave a comment

One of the reasons you might be getting this error is because you are trying to use the client object model without the sp.js file being loaded.

Other post regarding errors you might be getting related to the client object model and sp.js

You might need the ExecuteOrDelayUntilScriptLoaded method

Uncaught TypeError: Cannot read property ‘get_current’ of undefined

SP.ClientContext.get_current is null or not an object

SP.UI.ModalDialog.showModalDialog with margin and notification

November 16, 2012 Leave a comment

If you ever add HTML to a SharePoint modal dialog box you might notice that adding a left-margin is also necessary. Remember, the HTML option uses DOM not a string.

Style margin Property
Get the code

Adding SP.UI.ModalDialog.showModalDialog to a content editor webpart
 Client Object Model: SP.UI.ModalDialog.showModalDialog(options)
Opening a hyperlink in a dialog box in SharePoint 2010

How do I: Add new values to a drop-down list from the new item form

November 12, 2012 Leave a comment

If you want to have the ability to add new values from new form item you have two options. (that I know of) First you could use $().SPServices.SPLookupAddNew. Or, you could use the technique I have demonstrated in the video below.

Related videos:

How do I: Set the ID attribute of a table row using jQuery

How do I: Implement $().SPServices.SPCascadeDropdowns

How do I: Set the ID attribute of a table row using jQuery and SharePoint Designer

November 9, 2012 Leave a comment

While customizing an “add new item” form, you might find yourself needing to manipulate form elements via jQuery. However, before you can do that you must and an #id or .class to the elements in question. I will be adding an #id in this demonstration. But why would I want to manipulate form elements in the first place? If you wanted to hide/show a textbox based on the user selection of a checkbox you could use this technique.

Get the code

Related videos: