Category: Work > SharePoint 2010

K2 SmartObject Services – Configuration update, static endpoint

After the release of K2 1370, there have been some small updates to the K2HostServer.config file for your SmartObject Services configuration.

The basics is pretty simple, KB1370 added the ability to change binding and binding configuration on the REST and WCF endpoints separately. Because the binding configuration also defines the authentication mechanism, this means that REST endpoints could use basicHttpBinding with Basic authentication, while the WCF endpoint uses wsHttpBinding with Windows authentication. It also allows us to run either one endpoint on HTTPS while the other is not.

In my previous post on the K2 Services I showed you how to create a static endpoint, this simplifies the URL and allows you to rename or update the SMO without the endpoint changing. The configuration sections shown in those posts are now outdated and won’t work anymore. Since the KB article describing the change doesn’t have all the parameters, this post is also a note-to-self.

Read more »

K2’s KB001200 release

Since the release of K2 4.5 back in April, it’s been a bit quite of time before we got something new. We’ve seen the K2 components for SharePoint 2010 been release, but that didn’t bring any new functionality to the table. For those who don’t know, it “only” provides the same functionality of the SharePoint 2007 components. This doesn’t mean guys in South Africa have only been watching the worldcup, they’ve been working on a beauty called the 1200 series, which starts with the KB001200 update release.

In other 1200 releases (KB001230 and KB001260), we’ll see new functionality being added. This will be in the form of new features on the UI side, new Inline Functions, Wizards and Service Broker Objects.
So, what does the KB001200 release have:

  • New installer
  • Single sign-on for Workspace UI
  • Document Management Inline functions – Included in BlackPoint
  • Dynamic SQL Service Object
  • Workflow Client Services
  • Updated Create Item wizard – Included in BlackPoint

I’m going to jump into a few of the once I find the most interesting.

New Installer

Huh, again? Yes, again. The installer has not changed a lot. It has some new things to lay the foundation for the 1200 series. So, don’t expect a big change, you’ll still have that nice 4.5 feeling when you install the product. What is new, it includes the VS2010 extension and the K2 Components for SharePoint 2010.

Document Management Inline Functions

The 4.5 release brought us Inline Functions. In this post you can see what that is and read why it’s so important. K2 is now expanding the current list of inline functions to allow some document management functions. Below is a list of functions you’ll get.

Get Word Content

This allows you to get the content of a content control in word. Content Controls in word are useful for forms and getting data a bit more structured in a word document. Having the option to get the value of such a control allows you to make business decisions based on what a user entered in the word document/form.

Example of GetWordContent being used.

Get Cell

The Inline Function that started as a K2 underground blackmarket project. A good example of K2 looking what the field uses and then adding it to the product features. Some might think this is an easy way to add value, but don’t forget that because it’s in the product, it’s now supported and maintained by SourceCode. With the community stuff, you’re on your own. The function allows you to get the value of a given cell in an excel sheet.

Get Cell with Input

Roughly the same as the above, but it allows you to change a value in a cell, recalculate the workbook and return the information from a different cell. It uses Excel Services to calculate the workbook.

Get Range

Returns an array of values from the cells that have been specified. It looks at the first column if the range includes multiple columns.

Get Range with Input

See a trend here? Get Cell -> Get Cell with Input. Get Range -> Get Range with Input. It does the same as Get Cell with Input, but now with a range.

Example of GetRangeWithInput being used

Dynamic SQL Service Object

Way back in the RTM timeframe, the awesome Seb Garrioch created the Dynamic SQL Service Object. The labs team has updated it a bit and included it in the (supported!) product. What it does? It allows you to use Microsoft SQL tables, stored procedures and views as the base of your SmartObjects. We already got this in 4.5, but you had to create the SmartObject yourself. In this release, a niceUI has been added to SharePoint 2010 for you to create and manage the SmartObjects.

Create a Dynamic SQL SmartObject from the UI

Workflow Client Services

K2 is slowly creating WS/WCF/REST services for a lot of their API’s. The other 1200 series releases will have some more goodness for that. This KB001200 release features the ability to start and participate in workflow. It basically is the web serviced version of the SourceCode.Workflow.Client assembly. It will not feature everything, since it’s a bit hard to get all those API calls into a web services, but you’ll be able to complete tasks, get worklist information, start processes and more. The different endpoints support different functionality, with WCF being the one with the most features. The others (REST and old-fasion-asp.net web services) have less features, but that’s logical because you simply can’t specify a full ProcessInstance via REST. This KB001200 release will only have the Workflow Client Services, the other releases of the 1200 series will include more. Expect a full article on all the web services later…

Updated Create Item Wizard

When you build K2 workflows that are linked to a SharePoint site, you’re able to create items in that site. This updated wizard allows you to create those items in a different site/site collection then the one you’ve bind the workflow too.

Conclusion

I’m happy to see K2 is moving forward and expanding the functional artifects of K2, it shows how important the 4.5 release was and that is truly is the foundation for more things to come. A lot of new items are things you would be able to create yourself using SmartObjects or Inline Functions. K2 is simply adding them to the product which makes the OOTB experience better and it’s becoming a more complete product.

Thanks to Holly for the help and screenshots…

Creating a subsite using the client side object model in SharePoint 2010

We’ve all seen loads of things to you can so with the new Client Side Object Model in SharePoint 2010. I’m personally loving it more and more! The only downside is, most examples and code is made to retrieve information. The object model can also be used to create things!

Here’s a quick post on how we are creating subsites using the client side object model:

using (ClientContext ctx = new ClientContext("http://yoursite/"))
{
                WebCreationInformation wci = new WebCreationInformation();
                wci.Url = "YourSite"; // Relative URL
                wci.Title = "YourSite";
                wci.Description = "Your nice description.";
                wci.UseSamePermissionsAsParentSite = true;
                wci.WebTemplate = "STS#0";
                wci.Language = 1033; //LCID
 
                Web w = ctx.Site.RootWeb.Webs.Add(wci);
                ctx.ExecuteQuery();
}

And that’s it :)

The WebTemplate might be a bit odd, check this PowerShell script to to retrieve the correct values you can enter. Also note, custom web templates are possible and are also retrieved using this PowerShell:

PS C:\Users\ruarco> $s = Get-SPSite("http://yoursite/");
PS C:\Users\ruarco> $s.GetWebtemplates(1033) | select Name, Title

Note the LCID in the GetWebtemplates. The select is handy because custom web templates get a long guid and you’ll only want to select Name at those things.

WordPress Themes