Friday, May 21, 2010

We present you iTechnology Check Effective Permissions web part

There are numerous times when iTechnology consultants have had requests to determine user’s effective permissions around SharePoint sites. With SharePoint 2007 and WSS 3.0 displaying them in a tree format is currently not possible out-of-the-box. This is why we have built a small web part to display them on a desired site for our clients.

In this post I will get you through the FREE download, setup and features of our small tool that iTechnology present you with.

FREE download

You can download the iTechnology Check Effective Permissions web part from our Downloads section (free registration is required).

Setup

  1. Use install.bat file to add the solution to your SharePoint
  2. In Central Administration deploy iTechnology Check Effective Permissions feature to whichever site you need it.

Features

iTechnology Check Effective Permissions feature deploys a small web part to the web part gallery of the site. You can find it in the iTechnology group and add it to a desired page.

View as Site Collection Administrator

In the iTechnology Check Effective Permissions web part settings you can set Display mode of the web part which lets you choose between “Display from root site” and “Display from current site”. This is how the web part’s settings screen looks like:

The first option will present you with the opportunity to view permission levels coming from the various possible sources in the tree of websites in the current site collection; the latter one – only from the site where the web part has been used down the websites’ tree. This is how the screen looks like for Site Collection Administrators:

When the administrator hovers over the more marker a small window pops up with the granular effective permissions for the user. This is great for determining why some user can or cannot do something at a specific website:

View as User

The web part can also be used to display permissions for normal users. They will be presented with their permission levels and the more granular rights but cannot search for other users’ permissions:

The web part’s settings also can be applied and work the same way as for Site Collection Administrators.

Let us know what you think!

Read more on this article...
Bookmark and Share

Thursday, May 13, 2010

iTFA and Nintex: One click to complete task and save form

In my first post from “iTFA and Nintex” series I showed you how to open a specific iTechnology Forms Accelerator perspective from Nintex workflow. It is now time to move one step forward and complicate our life a little bit more but end up with the best possible integration of the two products.

The Goal

The goal will be to open an iTFA perspective from “My Workflow Tasks” Nintex webpart. But this is too simple, so I will add one more item to my list – when user selects an iTFA action to be able to save the form and complete the workflow task the same time. Here is the time to mention that this is a temporary work-around for the iTechnology Forms Accelerator versions up to 2.0.5. For the next major release this functionality will be included without the need of coding, so that every iTechnology Forms Accelerator and Nintex user benefit from it, not only the IT pros.


Resolution Scenario

The resolution scenario for my goal includes:

  • Create a custom content type “iTFA Nintex Task” that inherits from “Nintex Workflow Task” and will be used for Nintex approval tasks

  • Create a custom approval page and configure “iTFA Nintex Task” content type to use it

  • Add iTechnology Forms Accelerator user control in this page and pass the required parameters for it

  • Capture iTFA action and based on it execute appropriate Nintex task



Step 1 and 2

I will not stop on these two steps – how to create a content type and custom Nintex approval form and how to configure the content type to use the form. There is really good description of all this in Nintex SDK, which can be downloaded here. The SDK even includes sample code that can be used as a base for our solution.

Step 3

Now is time to add iTechnology Forms Accelerator user control to the page. As I said will use the sample code from the Nintex SDK as template, but will cut quite a lot from its functionality since all I need to show on my page is iTFA control. This means that will remove all UI and actions, and instead in Main placeholder will add the control, together with few JavaScript and CSS files references that iTFA control uses:

Note that those JS and CSS files are located in “12 Hive\TEMPLATE\LAYOUTS\itfa\xxx” and this should be considered when creating the path to them. In my case I will place the page directly under “12 Hive\TEMPLATE\LAYOUTS”, so the path looks as shown above.

To use iTFA control in my page, have to add a reference to it. It is located in “iTechnology.Forms.Clients.WebControl” assembly:

And this is all for the aspx page for now. Next – what changes are needed in the code-behind.

In my code-behind class first will check if the list is integrated with iTechnology Forms Accelerator. When a SharePoint list is integrated with iTFA, then there is a property set in its properties bag, called “IsITFAActivated” and its value should be “YES”:

As I said in the previous post, to make iTechnology Forms Accelerator show specific perspective there are 3 parameters required: List ID, List Item ID and Perspective name. List and list item IDs, are available from Nintex workflow task object. For perspective name I will add one more field in my SharePoint list. This field can be updated from Nintex workflow for example.

Besides those 3 required parameters, here I add PerspectiveType and FormID. PerspectiveType property is not required, while FormID I have to add to avoid exceptions like:
Value does not fall within the expected range.

And this all – now my custom approval page can display iTechnolgy Forms Accelerator form, and can be opened from “My Workflow Tasks” Nintex webpart.

Step 4

In my scenario I want to have 3 actions available: Approve (approve the request and save the form), Decline (reject the request and save the form) and Cancel (does nothing). So, in my iTechnology Forms Accelerator form, will add “Approval” perspective (the one that will open from my workflow) and there will add those 3 actions in actions section. Remember that if I want to add additional perspectives, the form has to be in Advanced mode. For the first 2 actions (Approve and Decline), I choose “SharePoint update” as type of action to achieve saving of the form. In “Post execute action” section I’m choosing to redirect to another perspective with name “View”. This way once the action is complete, my form will open in view mode so I can see the changes.

For Cancel action I select “No Action” option for type and again to be redirected to View perspective.

In the code-behind of my custom approval page, I have to override ActionSubmit event for iTFA user control. This way once an action is submitted, will be able to check if Nintex task has to be updated and then move on with the form.

ActionSubmit event has iTFAActionEventArgs type as event arguments and this is how will get the name of the current executed action:

And when knowing the name, the proper outcome for Nintex worklow task can be selected:



Well, this is really simple implementation and can be complicated and improved the way specific case requires it, but should give you the idea how to use iTechnology Forms Accelerator user control with Nintex workflow. Here you can download the code of iTFA / Nintex Approval Page (free registration is required).
Read more on this article...
Bookmark and Share

Tuesday, May 11, 2010

iTFA and Nintex: Open iTFA perspective from Nintex Workflow

Recently iTechnology signed strategic partnership with Nintex (read more here) and now is time to talk about how to combine iTechnology Forms Accelerator and Nintex Workflow 2007 to get the best from both products. This is the first post from our “iTFA and Nintex” series and today will focus on how to open iTechnology Forms Accelerator form by calling specific perspective name from Nintex Workflow.

Intro

iTechnology Forms Accelerator is a product that provides electronic forms for Window SharePoint Services 3 and Microsoft Office SharePoint Server 2007. The main idea that stays behind is to give business users an easy to use and intuitive tool so that they can create forms by themselves with ease, and the same time powerful enough so that IT pros can use it in their solutions for the most complicate scenarios. There are many features that every user can benefit from – strict version control, web-based designer, easy publishing and exporting of a form. For all features you can read here or in iTFA documentation, or watch how-to videos in iTechnology channel in Youtube.

iTechnology Forms Accelerator provides the opportunity to open a form by calling a specific perspective name. To do this, few parameters are required:

  • List ID – the GUID of a SharePoint list that is integrated with iTFA

  • Item ID – the ID of an item user wants to see

  • Perspective name – the name of the perspective to show


By default there are 3 perspectives in an iTFA form – New, View and Edit. These perspectives represent the possible states of a SharePoint item – when is being created (“New” perspective), when is opened for view (“View” perspective) and when is opened for edit (“Edit” perspective). Besides this, user can create custom perspectives with the condition that each perspective should have unique name. Note that adding/deleting perspectives is only available for forms in “Advanced” mode (for more details check iTechnology Forms Accelerator documentation).

So, what we need is a SharePoint list that is integrated with iTechnology Forms Accelerator and has a Nintex Workflow created for it. Let’s start step by step …


Step 1

Create a list and add some columns for it (if needed). Once the list is created, have to integrate it with iTechnology Forms Accelerator. I will not stop on how to integrate and create a form, since this topic is already covered in our how-to videos and iTFA documentation. What have to mention here, is that since I want to open specific perspective my form has to be in advanced mode (the default mode is “Starter”). To change it, open Pie menu, select “Advanced” section and click on “Settings” item. There select “Advanced” under Mode section and click OK to save the changes:

Now I can add additional perspectives which I'm going to use later from my Nintex workflow. For example one can be “Details” perspective and will use it to display request details.

Step 2

My iTFA form is ready, saved and published. Now I want to include a link to the “Details” perspective in my workflow. As I already said, to open a specific iTechnology Forms Accelerator perspective have to include the parameters listed above. All these values are available in Nintex workflow details (except for perspective name that will add directly). The URL looks like this:
{web} /_layouts/itfa/iTFADynamic.aspx?List={list GUID}&ID={list item id}&PN={perspective name}

To simplify further usage, I have prepared a method that can register as a Nintex Inline Function and then invoke in the workflows.

Few points when creating custom Nintex Inline Functions:

  • Methods should be static and public

  • Use parameters that can be parsed from text

  • Assembly should be strong-named and registered in GAC


Next – have to register my method as an inline function in Nintex. This is done with the help of NWADMIN.EXE utility and “AddInlineFunction” operation:
NWAdmin.exe -o AddInlineFunction -functionalias FunctionAlias -assembly AssemblyName -namespace Namespace -typename TypeName -method MethodName

In my case the command will look like:
NWAdmin.exe -o AddInlineFunction -functionalias "fn-iTFADynamicLink" -assembly "iTFA.Extentions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxx" -namespace "iTFA.Extentions.iTFADynamicLink" -typename "iTFALinkGenerator" -method "CreateDynamicLink"

You can read more about “AddInlineFunction” operation here (as well for all other operation available in nwadmin).

Step 3

In my scenario I want to add a link of my iTFA form in a mail to the user who started the workflow so that he/she can open and view it. This is why I created a text variable called “iTFA Link” and then added “Build dynamic string” action to my workflow:

For the content of the build string operation used my inline function and passed parameters in the order they are required:
fn-iTFADynamicLink({Common:WebUrl},{ItemProperty:ID},{Common:ListID},"Details")

The result from this call is then assigned to my variable and I can use it to create the proper link:

And add it in an email:


As you can see working with iTechnology Forms Accelerator and Nintex is easy, but most of all - definitely useful! Follow us for the next parts of iTFA and Nintex series.
Read more on this article...
Bookmark and Share