Customizing master-detail lists with SharePoint Designer

Sometimes (very often) we have to be faced with the user requirements of master-detail lists. If you want to implement a very basic one, it’s very simple: lookup fields can have very big strong. For example, you need to store company data with contact people:

  image

Well, how can you store these info pieces in SharePoint lists? – Of course, you’ll simply have two lists: first one for the companies, and the second one for the contact persons. In this second list you have to make a lookup column referring to the Companies list. In this column we’ll store the info where is that person’s working:

 image

That’s great, but in most cases that’s not enough. You can maintain companies and contacts in different spaces, in different lists. The main problems with this are the followings:

  1. You cannot see the related contacts on the Company’s form. For example, I’d like to have a form for Company1 where I can see Thomas, Spencer, Percy, Harvey and Harold.
  2. You cannot maintain the contacts directly from the companies data form. When you view/edit a contact person, you’ll be redirected to the contacts list’s AllItems.aspx instead of the related company’s DispForm.aspx.

So, would you like to know what I’m talking about? The default display form of a company is something similar this:

image

Instead of that, I’d like to see something like that:

image

I’m very sorry because of the Hungarian UI, but to be honestly this example is from my company’s Intranet site. Most probably you’re interested in a few words, so let’s start your first Hungarian lesson:

  • Ügyfél = customer
  • Kapcsolattartó = contact person
  • Bezárás = close

That’s it, I hope you understand everything else 🙂

Well, making a form like that is very simple, you just have to create a Data View webpart with SharePoint Designer. The source list of this Data View is the contacts list, filtered by the current company: create a custom company DispForm webpart based on the URL’s ID parameter, and you can connect this webpart to the Data Views. You need this trick just because the URL contains the company’s ID, but in the Data Views you need the name of that.

In the Data Views, all of the the items’ link redirect you to the selected contact person’s DispForm / EditForm – and very similar, the New Contact (“Új kapcsolattartó”) link placed in the footer of the webpart redirects you to the contacts list’s NewForm.aspx.

That’s well and good, but how are we redirected to the company’s page from these forms? – This step requires two little tricks. First of all, we have to tell the forms where to come back. It’s pretty easy, just place a parameter in the URL. For example, the New Contact (“Új kapcsolattartó”) link is something like this:

http://intranet/cust/Lists/Contacts/NewForm.aspx?CustomerID=112

where CustomerID is the ID of the current company, and you can read this from the URL as a QueryString parameter:

image

OK, we’re ready on the companies’ side, let’s jump to the contacts list. Here we should update all forms (DispForm.aspx, EditForm.aspx, NewForm.aspx) and learn them to redirect us to the related company’s DispForm instead of Lists/Contacts/AllItems.aspx. As the logic of this modification is similar on all these forms, let’s only see the NewForm.

First of all, what you have to do to change the default redirecting of Save and Cancel buttons is to replace the default NewForm webpart to a custom one. Changing the redirecting to a static URL is very simple, but in this case we need a dynamic URL in the redirection, because of the CustomerID parameter. Let’s dig into it and see the way of dynamic redirecting step-by-step:

  • Read the CustomerID parameter from the URL (see above).
  • Place the following snippet to the beginning of the Data View webpart’s code. With it you can build the redirect URL (RedirectLoc) in a dynamic way:

    <xsl:param name="CustomerId" />

        <xsl:variable name="RedirectLoc">/cust/Lists/Customers/DispForm.aspx?ID=<xsl:value-of select="$CustomerId" />

    </xsl:variable>

  • Finally, replace the default SAVE and CANCEL button to this ones:

    <input name="SaveButton1" type="submit" value="Save" onclick="BLOCKED SCRIPT {ddwrt:GenFireServerEvent(concat('__commit;__redirect={',$RedirectLoc,'}'))}"/>

    <input name="CancelButton1" type="button" value="Cancel" onclick="BLOCKED SCRIPT {ddwrt:GenFireServerEvent(concat('__cancel;__redirect={',$RedirectLoc,'}'))}"/>

That’s it! Hope you like it – more to come, stay tuned!

MOSS 2007 and .NET framework 3.5 SP1 – Second part

I've had an article about our .NET Framework 3.5 SP1 issue, where the Records Center went wrong after the .NET Framework 3.5 SP1 installation. Well, that story comes back to my life again and again, so I had to search forward the issues.

Well, Anders mentioned the loopback check in his comment as well as the Microsoft MCS recommended me to check that. (Un?)fortunately I’m too curious and the simple solution is not enough to me. I wanted to know: why?

First of all, some facts:

  • My post about this issue was written on October 31, 2008.
  • Another post about loopback check was published on Ocober 30, 2008 here. It isn’t about the Records Center, but contains a good description and something very important to us (highlighted by me):

The purpose of the loopback check is to eliminate denial of service attacks however it causes issues with access SharePoint sites locally from the server.

  • The current .NET Framework SP1 was published on November 18, 2008:

 

 

All in all, setting off the loopback check can help us if the requests are local on the server. Sounds good, but the Records Center was tested from remote computers as well, not only from the MOSS application server! In this case, only one thing can be the root of every trouble: if there are some local requests during the Records Center operation. Let’s see, what happens!

First of all, about the Records Center in a nutshell. The Records Center is based on a special site template, and practical to create it at least into a separated site collection, but very often into a separated web application. Moreover, we have the chance to use a Records Center from a remote SharePoint farm.

After creating the Records Center, we have to configure a few things (for example records routings) and set in the Central Administration site which Records Center we want to use. This setting is based on the web service of Records Center located at /_vti_bin/officialfile.asmx.

Well, on the face of it, if we send a document to the Records Center, this web service is calling:

But if we see behind the scenes, we have to recognize that after clicking on “Send To –> My Records Center” there is a calling to the local server’s SendToOfficialFile.aspx located in the LAYOUTS folder. After that, there are the following requests in the background:

 

That’s it – after calling the SendToOfficialFile.aspx there are a lot of API callings, and the officialfile.asmx is only at the end of this queue! Moreover, if the Records Center is on the same MOSS server (farm), this calling is local! Yes, this is the root problem, our loopback check problem just became understandable now!

Of course, this is a solution to our question, why the Records Center wasn’t working even if we’ve created a new one to the same server.

One more thing. Unfortunately the error messages are not too obvious in this case. For example, the error message got here (”The DevRC Records Center could not be found or accessed.”) can be occured by other errors as well. This is because behind the Records Center’s operating there are not too much error codes, as we can see in this enum:

I hope that’s the real root of the issue and can be resolved first, last and all the time, and I don’t have to say: “to be continued” 🙂

Searching your SharePoint sites with Internet Explorer 8

IE8 has a very customizable Search Toolbar. Of course, the default search engine used by it is the Live Search, but you can manage the search providers in a very easy way. Just click on the “Find More Providers” menu:

image

On that page you can find the most popular search providers like Google, Live Search, AOL, Yahoo!, etc. You can add them to your search toolbar with a simple click:

image

 

Moreover, on the right side of the screen you can find a very interesting section: “Create Your Own”. Here you are, that’s your friend if you want to add your SharePoint search page to the IE toolbar! For example, if your SharePoint search’s result URL is http://intranet/search/Pages/results.aspx, you have to enter this to the first text box: http://intranet/search/Pages/results.aspx?k=TEST (the ‘k’ parameter passes the search expression to the results page). The second text box have to be filled with the name of this search provider as you want to see in IE8:

image

Here you are, now you’re able to use your SharePoint search site directly from your browser!

image

These days

There were a lot of interesting events and announcements in the world, while I’ve been with my baby daughter in the last days. In the meantime I’m reviewing some technical documents…
So, here you are a short enumeration about the most important SharePoint-related news of the past days:

  • SharePoint Dispose Checker: During SharePoint development there is a common thing to have disposa problems. These issues makes nightmares to the developers as well as end users because of the bad quality of codes. Fortunately, the SharePoint Dispose Checker has been available since the end of January:

SPDisposeCheck is a tool to help you to check your assemblies that use the SharePoint API so that you can build better code. It provides assistance in correctly disposing of certain SharePoint objects to help you follow published best practice. This tool may not show all memory leaks in your code.

FAST Search for SharePoint will combine high-end search with the broad portal, collaboration, content management and business intelligence capabilities of SharePoint.

  • Best Practices Conference: The second Best Practices Conference was a very great success in San Diego last week. The series will be continued in London, at the beginning of April. I’ll be there with my family, and have two sessions: “Search can be your best friend you just need to know how to talk to it” and “Best Practices for IW Document Management with SharePoint 2007”.

PerformancePoint Server

There was a very important announcement in the last days regarding the PerformancePoint Server 2007: this product will be the part of SharePoint Server Enterprise CAL instead of having separated licensing options. Of course, this takes effect to the future as well:

In the future, the monitoring and analytics capabilities will be included in the next release of SharePoint Server and will be available to SharePoint Enterprise CAL customers.

More information:

Nora

Normal
0

21

false
false
false

HU
X-NONE
X-NONE

MicrosoftInternetExplorer4

<!–
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:238;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1107304683 0 0 159 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;
mso-font-charset:238;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:-1610611985 1073750139 0 0 159 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-unhide:no;
mso-style-qformat:yes;
mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;
mso-fareast-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";}
.MsoChpDefault
{mso-style-type:export-only;
mso-default-props:yes;
font-size:10.0pt;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
–>

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}

I’m very happy to announce that my second child, the little baby daughter, Nora was born last Sunday. Both of us are fine and healthy.

 

Document Management (?!)

What do you think, what should be the firts (moreover: 0th) step of developing a complex Document Management System (DMS)? Specification? Planning? – No! Forget them, until you haven’t made a lot of discussion with the customer – about the words, definitions, concepts. What does the word “document” a or expression “document management” mean to them?

Most probably in their understanding these words are hardyl different form yours. It’s not because their or yours one is false, but because of the differences of our circumstances, job roles, experiences, etc. It’s just a little customer-psychology…

What are ‘document’ and ‘document management”?

Well, the word ‘document’ can have a lot of meanings. Document can be everything on that people work, has a special lifecycle from creating through saving, storing, approving, etc. to recording, registration, retention, deleting, etc. This lifecycle is the process of document management, and the records management is a part of its. But I have to mention, that generally we’re talking about ‘document management’ while the document is living, while its content can be changed. After that, when document is frozen and registered, we can talk about records management.

Both of them (document and records management) are very complex business processes, different in every companies and every organizations. For example, the following picture shows a quite simple records management process from one of our projects:

So, first of all, let’s define what the customer wants: what kind of documents they have, what kind of processes they have, etc. SharePoint can be a very good basis of a document management system, but you have to plan it and its architecture very deeply.

Document management tasks and functions

Long-long time ago, during my first DMS developing project, when I was a simple developer, one of my colleagues found a statistics made by Gartner Group: in average we spent 8 hours (one full working day!) in every week with handling and searching our documents!

Bill English and Ben Curry mentioned very similar statistics in their book, Microsoft® Office SharePoint® Server 2007 Best Practices:

    • Over 30 billion original documents are used each year in the United States.
    • The cost of documents to corporations is estimated to be as much as 15 percent of annual revenue.
    • 85 percent of documents are never retrieved.
    • 50 percent of documents are duplicates.
    • 60 percent of documents are obsolete.
    • For every dollar that a company spends to create a final document, 10 dollars are spent to manage the document creation process.

Horrible numbers, isn’t it?

A few weeks ago a bank asked us for a feasibility study. Their goal is a complex Document Management System. When we asked them about the quantity of stored documents, their answer was: “A few hundred meters per division…” Oh my god!…

Well, we can be faced a lot of different needs and requirements while we need to collaborate during the first phase, but most probably you can find some common functions as well. Let’s see a few of them!

Saving and storing

Of course, first of all we have to store our documents in a well-organized, effective and user-friendly way. A centralized, unified storing method means a lot of useful things: instead of documents stored locally and sent by e-mails back and forth – the users can work on the same document without any duplications. Moreover, we get the following functions as well: storing, collaboration, sharing, version handling, content types, permission handling, etc.

Check-out, check-in, locking

If somebody opens a document to read, he/she can do this without any problem (of course, with the required permissions). Even more people at the same time, there are no conflicts occurred. Nobody wants to modify, they don’t disturb each other.

But if one opens a document to edit, it might be a problem if somebody else wants to edit this one as well. They overwrite each other’s modifications and nobody knows which version is valid.

The solution is the check-out/check-in. The editor checks out the document, so everyone else is unable to edit it (the document is locked) until the editor’s check-in. Moreover it’s very obvious who is editing the current document at a current time as well as the full, valid version history can be stored.

Version control

Version control is bound up with the facts mentioned before. I cannot describe its importance enough: to be able to reach the former document versions, check modifications etc. are one of the most relevant requirements of a modern document management system.

During creating and editing documents, the system is storing several versions for us to give a way to follow the full lifecycle of the document. We sign the versions with rising numbers, and generally the several DMSs realize this function in several ways. Basically we can talk about three level of version control:

  • No version control, the system is storing only the last version of each document. In this way we are not able to get back the former versions and the history – of course, sometimes it’s even not important.
  • Major versions only: The versions are marked by positive integers (1, 2, 3, …). After saving the document it gets a new increased version number, and the several versions can be accessed by different permission sets (current version vs. former versions. We use this option when it’s insignificant to make any difference between published and draft versions (working copies).
  • Major and minor versions: The versions are marked by numbers formatted as X.Y (1.0, 1.1, 1.2, 2.0, 2.1, …). We use this option when it’s important to make difference between published and draft versions (working copies). The published versions can be accessed to read by a wide range of users, but the drafts are hidden from most of them, only the editors can see these ones.

Approving and other workflows

Content approval is a very nice function of DMS systems as well. The document is in Pending status until the Approver or group of Approvers doesn’t approve it. After approving, it will be approved (or declined in other case), and will be accessible for others. The exact process of approval workflow depends on the version settings as well.

Moreover, in a modern DMS we can (and most probably we have to) implement a lot of other workflows as well. It’s very important how our system is able to manage these workflows, and how users have to be faced with the processes.

Permission management

Of course, one of the most important issue of nowadays’ systems the permission management: who and how can access to what content? Who can read, edit, create, delete, etc.?

Sometimes (very often) these permissions are not a frozen set, but change during the document’s lifecycle. For example, related to a project proposal:

  • During the preparing phase only the preparers can see the documents (and create/edit them, of course), everybody else are denied even to read them.
  • During the approving phase even the preparers cannot modify the documents, but the approvers get permissions to read.
  • After approving the signers get access to the documents, but nobody is able to edit their contents.
  • etc.

Well, we can see, document management is a very important and very complex process in the business life. In the followings I’ll go forward along these basic functions, and of course, we’ll see how SharePoint can help us to realize these functions.

Stay tuned!

Presenting at European SharePoint Best Practices Conference

After the success of SharePoint Best Practices Conference, organized by Mindsharp last September in Washington DC, the series goes on. Next event is going to be at the very beginning of February, in San Diego.

This conference goes beyond the how-to’s of SharePoint and delves into real world issues facing successful SharePoint implementations. Learn how to:

  • Make consistent, confident decisions at every level, across your enterprise.
  • Break the cycle of avoidance, disagreement and ignorance that leads to subpar results.
  • Eliminate design, deployment, organizational and administrative confusion.
  • Apply effective SharePoint decision-making in any situation and in turn enhance enterprise communication, collaboration and efficiency – while significantly lowering cost.
  • Replace disorder with clarity, direction and confidence.

Learn practical and productive SharePoint practices from the industry’s leading authorities. Event speakers include:

  • Microsoft MVPs
  • Microsoft Product Team Members
  • Industry Experts

Although I was presenting in Washington DC, I’m unable to fly over to the second Conference, but I’m very proud to announce: I’m presenting at the first European Best Practices Conference, 6-8 April, London, UK. My sessions are the followings:

  • Best Practices – Document Management with MOSS 2007 (IW 310): Document Management is one of the most important function of SharePoint. In my session I’ll try to clarify what the word ‘document’ means, what is the typical document lifecycle model, and what kind of tasks/functionalities are needed in a document management system. After discussing these general questions I’ll show how can we take the advantages of SharePoint and the full Office System as an advanced document management system, where processes (workflows) and the optimal storing is very important as well as usability and findability/searchability.
  • Search can be your best friend you just need to know how to talk to it (IW 306):  Whatever you work, finding the information what you are searching for is one of the most critical part of your everyday tasks. MOSS 2007 has a very powerful query engine – if you know its capabilities, and how to use them in an easy way, you could get a really good friend. I’ll introduce you to my friend called SharePoint Enterprise Query: what is the right way to do a query or make use of the advanced search options , how to manage your search results and alerts, how to search in external data sources – or even how to search with SharePoint but without opening your SharePoint site.

More information as well as registration can be found on the website of the Conference.