Everything starts with a simple business requirement: the customer wants a simple ticketing solution. This ticketing solution ought to have the following features:
- The information kept should be: Title, Description, Comments, Status of the Issue, Due Date, possibility to attach files.
- The Due Date has to be at least one week from the creation date of the ticket unless the user is not member in a special team which is allowed to brake this rule.
- The information displayed into the New, Display, Edit has to be different based on the user role. For example when adding a new ticket the Status field should always be New.
- The is an attached approval workflow mainly based on the status of the ticket: New – Assigned – Working – Waiting for Approval – Approved – Closed.
The first step was to create a new site content type which inherits the built-in Issue content type. I created it at the Site Collection level and this way I got the possibility to use it in every sub-site of the site collection.
The second step was to create the Ticketing list based on the Issue list template and enable content types on it (from Advanced settings). Then I removed the default content type and added my content type as the default content type for this list.
The question was how to implement further. If for the process it was clear that I was going to use a SharePoint Designer Workflow, for the data views (New, Display, Edit) there was a big question: which of the two available options to choose: InfoPath List Forms or SharePoint Default List Forms.
InfoPath List Forms
This is a new feature introduced in SharePoint 2010 and it is used as default for every SharePoint list. You can easily customize the form if you have Office InfoPath 2010 installed by pressing the Customize Form button located inside the Ribbon. An interesting laboratory about this can be read on the MSDN web site: Customizing SharePoint List Forms in InfoPath 2010.
There are improvements compared to InfoPath 2007 Forms, which can be easily seen into the new interface, like:
- Person Group Picker
- Rules / Manage Rules
The main advantage of this feature is that you can easily customize the SharePoint form without having any knowledge of HTML or SharePoint Designer. So for the Information Worker people this might be a very interesting feature.
But when I tried to implement my business requirements I found some disadvantages which I couldn’t ignore:
The is only one form for all the displays: New, Edit, Display. Even though you can create different views for the form, it seems that you cannot use them for different purposes.Update: You can create different views in InfoPath and then configure which view should correspond to a specific action: New / Edit / Display. Thanks to Proudpapa you can find at the following link a detailed how-to – Howto start customize list form (New/Edit/View) using InfoPath Designer 2010.
- Using Rules I couldn’t implement the following restriction: The Due Date has to be at least one week from the creation date of the ticket if the user is not member in a special team.
- There is no code behind for type of forms.
SharePoint Default List Forms
To activate them please navigate to list settings using the ribbon button.
Then please click on the Form Settings link and choose Use the default SharePoint form radio button.
After this step is done just open the list in SharePoint Designer and start modifying the NewForm.aspx, DisplayForm.aspx and EditForm.aspx of the custom list. And now we will walk on the same path opened by SharePoint 2007. Just hide the built it web part and add the corespondent custom form. Now we can benefit of all SharePoint Designer customization possibilities.
A Small Remark
In Form Options in order to see both of the options – Modify the existing InfoPath form, Use the default SharePoint form – you need to customize the SharePoint Infopath List Forms first (by pressing the Customize Form Button).
In my laboratory environment sometimes the SharePoint list had a strange behavior: sometimes in Form Options the “Use the default SharePoint form” disappeared. The only way to see the two options back in From Settings was to press the Customize Form button one more time !!! and then to publish the form from InfoPath. It seems that it looses the list settings or something similar.
Trackback from your site.