Posts Tagged ‘WSS 3.0’

Creating Test / Filler / Example text from Microsoft Word #SharePoint #SP2010 #in ‘#MSOffice

February 7, 2011 1 comment

I always forget the following link when I want some example text in my projects for Plain / Rich Text fields (in Lists and InfoPath Forms), Word Documents (Document Management etc.)

Microsoft Office Help Link:

Quick Reference

Within Word type the following:

  • =rand()
  • =lorem()

These produce a single paragraph, but the function is configurable via the following parameters:

  • =rand(insert the number of paragraphs, insert the number of sentences)
  • =lorem(insert the number of paragraphs, insert the number of sentences)

Example: =lorem(1,6)


A reference / links to Creating Custom Actions in #SharePoint #SP2010 #in

February 7, 2011 Leave a comment

Some good links that a colleague found about adding custom menu actions (ECB):

SharePoint 2007 Examples:

SP2010 MSDN Article:

WSS 3.0 / MOSS 2007 MSDN Article:

Useful Information: Determining if the web service return is a File or a Folder in GetListItems (Lists.asmx) #in #SP2010 #SharePoint

February 7, 2011 Leave a comment

Just a useful quick tip I noticed whilst answering a question for a client the other day.

In the return of the GetListItems method of the Lists.asmx Web Service, one of the fields is:

  • ows_FSObjType

This essentially allows us to determine of the return is either a File or a Folder.

The detail of the return is as follows:

  • <Item ID>;#<File System Object Type>
  • Example Data: 1;#0

Options for the File System Object Type:

  • 0 = File
  • 1 = Folder

Useful JavaScript Function: PreSaveAction #SP2010 #SharePoint #PS2010 #ProjectServer #in

January 25, 2011 1 comment

Just a quick blog post to talk about a standard JavaScript function that exists in SharePoint 2007 and 2010 – PreSaveAction().

Now I have done extra validation and functions on list forms in allsorts of ways before (some of which is blogged on this site) and it is only recently that this standard function has been brought to my attention. (Thanks @GlynClough via twitter).

Once I learned about this function I of course google’d about it to see what I could find and came across the following blog articles:

These are excellent articles that explain the function, however in the way I tend to work in my projects it posed a problem.

We are essentially overriding a standard SharePoint JavaScript function and the articles assume that you can place a Content Editor Web Part onto the page to add the functionality.

Now in SharePoint 2010 this is less of a problem, since there are very good and official ways to add web parts to list form pages, even in a Publishing Site.

However, in Microsoft Office SharePoint Server 2007 utilising publishing sites, editing newform.aspx and editform.aspx pages caused many issues.

This forced the consultant / developer to create their own new / edit forms and pages in order to insert sometimes a very small amount of code.

Since most of my projects seem to involve the Publishing feature in one way or another, I typically place JavaScript reference files in the Master Page.  This means that my JavaScript code is running on every page.

So, getting to the point of this article, I have modified the general example that is supplied on other sites to take into account this method of JavaScript development by simply querying what page I am on before I run my validation tests and functions.

Code Example:

1 <script type='text/javascript'> 2 3 //global variable to be used in multiple functions 4 var currentPathname = location.pathname; 5 //set to lowercase to make comparisons in the code easier 6 currentPathname = currentPathname.toLowerCase(); 7 8 function PreSaveAction() {; 9 10 if (currentPathname.indexOf('Enter Pathname here IE. /lists/tasks/editform.aspx') != -1) { 11 //Setup your validation checks here 12 if (1 == 1) { 13 alert('Validation passed, let SharePoint continue'); 14 return true; 15 } 16 else { 17 alert('Validation failed, stop SharePoint from saving the item'); 18 return false; 19 } 20 } 21 22 //If we have got to this point, then no pages need pre-validation. Let SharePoint continue. 23 return true; // OK to proceed with the save item 24 } 25 26 </script>

Found a useful post about #SharePoint Web Services #SP2010 #in

January 12, 2011 Leave a comment

In my travels of playing with the SharePoint Web Services, I found the following post useful.

Although it is based on WSS 3.0 / MOSS 2007.  Much of it is still relevant for SharePoint 2010.

Using jQuery to return all members / users of a group #in #SP2010 #SharePoint

January 12, 2011 1 comment

I’ve recently had cause to determine if a user is within a particular group in SharePoint and act upon the output.

Luckily the standard SharePoint web services allow to query for this information utilising the User Group service at location: http://<server>/_vti_bin/usergroup.asmx.

In particular the method GetUserCollectionFromGroup will provide the complete list including the Windows SAMAccountName (login name) as part of the return.

However, in this instance I was caught a little by a permissions problem.  Although I could query the web service, it kept returning a status of “parsererror” and an output of “Access Denied”.

This was resolved by changing the group settings to allow “Everyone” to read the membership of the group.


Code Example

The following code utilises jQuery to access the web service:

1 <script type='text/javascript'> 2 3 _spBodyOnLoadFunctionNames.push("getUserCollectionFromGroup"); 4 5 function getUserCollectionFromGroup() { 6 var soapEnv = 7 "<soap:Envelope xmlns:xsi='' xmlns:xsd='' xmlns:soap=''> \ 8 <soap:Body> \ 9 <GetUserCollectionFromGroup xmlns=''> \ 10 <groupName>Group Name Here</groupName> \ 11 </GetUserCollectionFromGroup> \ 12 </soap:Body> \ 13 </soap:Envelope>"; 14 $.ajax({ 15 url: "/_vti_bin/usergroup.asmx", 16 type: "POST", 17 dataType: "xml", 18 data: soapEnv, 19 complete: getUserCollectionFromGroupReturn, 20 contentType: "text/xml; charset=\"utf-8\"" 21 }); 22 } 23 function getUserCollectionFromGroupReturn(xData, status) { 24 alert("Status: " + status); 25 alert("Output: " + xData.responseText); 26 } 27 </script> 28

I just won a free MSDN subscription… SharePoint Home Drive Web Part #in #SP2010 #SharePoint

December 1, 2010 10 comments

A while ago I entered a competition that Liam Cleary (MVP) was running about Web Part contributions in the community. (Link)

Turns out I won. (Link) Smile

Thanks Liam, I shall be using the subscription for some new web part ideas I have.

The web part in question was my SharePoint Home Drive web part.  This was developed for IT Administrators in schools to give access to Teacher’s & Student’s home drives within their intranet to aid SharePoint adoption.

It was released a couple of years ago and has been used in various educational institutions.  It has also recently been tested in SharePoint 2010.

Competition Entry:

1. What the original problem was

Ensuring that users can access their home drives within SharePoint to aid adoption of the SharePoint Portal within the education establishment.

2. Why SharePoint was chosen

SharePoint was chosen due to its flexibility and support from third party vendors for the various applications currently in use.

SharePoint’s educational licensing costs allows schools to user enterprise scale solutions for a fraction of the cost.

3. What the solution was (end-to-end)

To aid education establishments in providing a single collaboration portal connecting all appropriate solutions into one place including:

  • File Shares
  • Email
  • Cashless Catering
  • MIS integration
  • E-Learning
  • + others

4. How it helped

Although all the 3rd party vendors provided web parts etc. for the various applications, users were still having to go away from the solution to access their personal files.

Document libraries will be used for future years of children as the architecture catches up with the change in solution, however for current student data, financials did not allow for the required increase in storage in the SQL database.

Training of document libraries for non-IT staff in terms of uploading files and the understanding of metadata was troublesome and take up of the collaboration solution was slow among some staff and students.

Shared folders on the network were easily integrated using the Page Viewer Web Part in File / Folder mode and a Search Server Content Source of the Network Share.

However, this method could not easily be implemented for a user’s home drive, due to the dynamic nature of the UNC path.

Typically, this is set up in Active Directory using the user’s ADUserName (SAMAccountName) as the folder name for the share.

To solve this, I created a Web Part that allows administrators to specify the UNC path of the file share; it will then inject the AD username after the UNC path.

This provides a File Explorer view of the user’s home drive within the SharePoint Portal.

This was developed to be an interim solution until Document Libraries were fully adopted by end users and the SQL storage could be bought with future budget.

The SharePoint Home Drive web part was released to the community via CodePlex in June 2009 and has recently been tested in SharePoint 2010 environments also.

Compatibility of the Web Part also includes WSS 3.0 and SharePoint Foundation 2010.

Web Part URL:

Scaling Limitations for SharePoint and Project Server 2007 / 2010 #SP2010 #ProjectServer #EPM #WSS #MOSS

November 9, 2010 Leave a comment

Just a useful link about SharePoint and Project Server scaling limitations that I keep losing.

SharePoint Foundation 2010 / SharePoint Server 2010 / Project Server 2010

SharePoint Server 2010 capacity management: Software boundaries and limits:

Windows SharePoint Services 3.0 / Microsoft Office SharePoint Server 2007

Plan for software boundaries (Office SharePoint Server):

Project Server 2007

Plan for software boundaries (Project Server):

Video Showcase – Media Player #in #SP2010

November 4, 2010 5 comments

SharePoint Media Player 1.1

A web part which places a Windows Media Player object on the page to play audio / video. The web part takes into account the problem of menu’s going behind the Media Player window.


  • Windows SharePoint Services 3.0
  • Microsoft Office SharePoint Server 2007
  • SharePoint Foundation 2010
  • SharePoint Server 2010

Video Showcase – Internet Search #in #SP2010

October 31, 2010 Leave a comment

SharePoint Internet Search 1.6

A Web Part to place an Internet Search area on the page.
Extended from the original Google Search to include Windows Live (default), Google and Yahoo. Logo’s are provided as standard with configuration of your own logo’s if required.


  • Windows SharePoint Services 3.0
  • Microsoft Office SharePoint Server 2007
  • SharePoint Foundation 2010
  • SharePoint Server2010
%d bloggers like this: