Archive

Archive for the ‘SharePoint’ Category

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”

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.

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:
Follow

Get every new post delivered to your Inbox.

Join 1,669 other followers

%d bloggers like this: