Moss Timer Jobs - What do they do?

I came across an interesting post from Mark Arend today whichi nicely lists out all the Moss Timer Jobs with a description of what they do along with some assembly info, catch it here:

http://blogs.msdn.com/markarend/archive/2008/09/06/list-of-moss-timer-jobs.aspx

It was posted a while ago. But hey this way I'll find it again easily.

IainW

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

SharePoint Conference pt2

Day 1 in full of the conference.First full day at the conference and a mixed bag of presentations.The morning was a long session comprising a  keynote by Steve Bulmer and an overview of the new features of SharePoint 2010. Steve’s presentation was slick as would be expected, but I lost count of the number of time the words ‘Super’ and ‘Excited’ were used JThere was of course a lot of whooping and clapping....Main features of note from the presentation are:
  • List capacity is now millions of items
  • Ribbon interface (Contextual)
  • External List support – showing data from external applications within SharePoint as lists (Business Connectivity) This is now available in SharePoint foundation (WSS)
  • Much deeper integration with Office 2010
  • SharePoint workspace – allowing offline storage of site lists and data, including external data
  • Easier editing of pages, using wiki style editing
  • Improved management and navigating by taxonomy
  • Repeatable workflow in SharePoint designer
  • LINQ, JSON and REST support
  • Significantly less page refreshing and post backs
  • Improved social computing
  • > 500 Powershell cmdlets to ease scripting (that will please Iain J )
AfternoonThe afternoon saw the start of the breakout sessions.

Development platform overview

  • SharePoint 2010 can be run on Vista and Windows 7 64 bit workstations so developers don’t need to have a server to developer
  • Visual Studio 2010 now has many extra tools for development including:
  • Visual Web Part design (drag and drop controls)
  • Sharepoint server explorer – to see all the lists / sites / features and their proprieties
  • LINQ for SharePoint to talk to lists
  • Developer Dashboard – the ability to view page data (load times, payload, the stack etc) in the browser
  • Relational Lists – cascading deletion
  • Validation of fields with excel type formula
  • Lookup to multiple columns
  • XSLT is now the standard for rendering views (but CAML is retained for queries
  • Client Object Model to collaborate with SharePoint and undertake some admin. It has .net, Silverlight and JavaScript api’s
  • Some new event handlers -  eg. When lists are created
  • A new notification area – displays small pop up notices in the browser (e.g. loading)
  • Dialog Framework – e.g. for editing SharePoint list items without the need for post back
  • Sandboxed Solutions – administrators can limit what resources an application can use.
  • Improved packaging and delivery
Visio Services
  • Visio 2010 has a number of improved functions for diagramming. One of the most interesting is the ease of which diagram can be connected to external data sources and information from those displayed on the diagram.
  • A new Visio Service is now included in SharePoint Enterprise. This allows diagrams saved in the web drawing format to be displayed in any browser. The diagrams can have zoom / drag etc.
  • Visio diagram web part that will host a diagram and allow the above functionality. Allows web part connections and ‘mash ups’
InfoPath Services
  • The browser based InfoPath service now support more controls.
  • Cascading drop down lists are now supported without needing code
  • An interesting demo is using InfoPath to create forms for SharePoint lists

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

JQuery - Getting data from a SharePoint List

As part of the series of articles, we will look at retrieving some data from SharePoint.

For this example, we will look at getting data from a list, in this case a simple Announcements list, and put the data from that list into a web part on a page. (I appreciate that this could be done several other ways, but it will serve the purpose on this example)

Before doing any custom script, we will need to make a reference to the core JQuery script files. If you have access to the server, you can put the files into a convenient folder in the LAYOUTS directory, or you could upload into a document library.


To start, we will put a Content Editor Web Part onto a page. Once added, we will now add the following..

[code:html]

<script src=”/_layouts/examplescripts/jquery-1.3.2.js”></script>
<script language = “javascript”>
</script>
<a href="#" onclick="GetAnnouncementData()">Test</a>
<ul id="AnnouncementData"></ul>

[/code]



In the above, we have a reference to the jQuery library, a script container, a link to enable us to manually test and an empty ul. (Note – don’t try clicking the link yet – we haven’t defined any functions)


The jQuery library can be downloaded from here.


Our Announcements list will contain the default Title Body and Expires columns. We will use the lists.asmx web service to retrieve data from our list, that we can then display.


To start, we will add a new function into the Content Editor part, which we will call GetAnnouncementData. The first part of the function will define  the SOAP packet that gets passed to the lists.asmx service. (For full details of the options available, the details are available on MSDN
Our packet is as follows. We have defined the list name and the fields to retrieve

[code:xml]

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
   <soapenv:Body>
    <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
     <listName>Announcements</listName>
     <viewFields>
      <ViewFields>
        <FieldRef Name='Title' />
        <FieldRef Name='Body' /> 
        <FieldRef Name='Expires' />
      </ViewFields>
     </viewFields>
    </GetListItems>
   </soapenv:Body>
  </soapenv:Envelope>

[/code]

Note that the bold item above is where we are defining which method form lists.asmx to use

So now our script will look as per below.

Next, we will connect to the web service. JQuery has built in functions to provide this. We will add the following to our function...

[code:html]

jQuery.ajax({
  url: "http://mossgj/devsite/jquery/_vti_bin/lists.asmx",
  type: "POST",
  dataType: "xml",
  data: soapPacket,
  complete: processResult,
  contentType: "text/xml; charset=\"utf-8\""
 });

[/code]

You can see from the above that we are referencing the lists.asmx web service. (you will need to change the URL to your server).

The  data: soapPacket is instructing the function to pass our packet to the web service.
The complete: processResult tells the function to call another javascript function and process the data returned.

Our script will now look as below


(Note that if you try to run the script at this point, it will fail as we haven’t yet defined the processResult function)

Now we can add the function to process the result. Above our closing script tag, we will add a new function...

[code:html]

function processResult(xData, status) {
  alert(xData.responseText);
}

[/code]

This is going to read the data returned and show a message box with the complete package. If you save and close, then click you test link, you should get a message box with the complete returned data, similar to the following

Now we will read individual rows. Into the processResult function, add the following...

[code:html]

jQuery(xData.responseXML).find("z\\:row").each(function() {
alert($(this).attr("ows_Title"));
});

[/code]

This will read each row returned and call a local function. The function will read the ows_Title attribute and get the data. After clicking our test link, we should now see a second message box with the announcement title.

Next, we are going to remove the alerts and ask jQuery to add heading to our empty ul for each announcement. Replace the alert($(this).attr("ows_Title")); for the following...

[code:html]

$("<li>" + $(this).attr("ows_Title") + "</li>").appendTo("#AnnouncementData");

[/code]

This line is asking jQuery to append an <li> item for each row. The function is building the html and appending it to the item with an id of AnnouncementData.

The part of the function $(this) is referencing the current row returned. The .att(“ows_Title”) is reading the value of the Title field (note that the lists.asmx web service prefixes the field with ows_). Finally, the .appendTo is asking jQuery to append the html to an element with an id of AnnouncementData (see jquery selectors for detailed instructions on how to select items by title, class or id)

If you now click your test link, you should see the list item appear.

Finally, we are going to ask jQuery to do all of the above automatically, as soon as the page is ready. Just above our closing script tag we will add the following...

[code:html]

$(document).ready( function(){
GetAnnouncementData();
});

[/code]

This jQuery function tell the page to run our GetAnnouncementData function as soon as the page is ready. After saving our content editor web part, we should now see a list of all of our announcement titles.

Obviously this is a relatively simple example. The next post will expand upon this and show how we can return a subset of data and make the things more dynamic.

Completed Content Editor Web Part source

[code:html]

<script src="/_layouts/novotronix/jquery/jquery-1.3.2.js"></script>
<script language = "javascript">
function GetAnnouncementData()
{
var soapPacket = "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \
   <soapenv:Body> \
    <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
     <listName>Announcements</listName> \
     <viewFields> \
      <ViewFields> \
 <FieldRef Name='Title' /> \
 <FieldRef Name='Body' /> \
 <FieldRef Name='Expires' /> \
      </ViewFields> \
     </viewFields> \
    </GetListItems> \
   </soapenv:Body> \
  </soapenv:Envelope>";
jQuery.ajax({
  url: "http://mossgj/devsite/jquery/_vti_bin/lists.asmx",
  type: "POST",
  dataType: "xml",
  data: soapPacket,
  complete: processResult,
  contentType: "text/xml; charset=\"utf-8\""
 });
}

function processResult(xData, status) {
 jQuery(xData.responseXML).find("z\\:row").each(function() {
$("<li>" + $(this).attr("ows_Title") + "</li>").appendTo("#AnnouncementData");
});
}

$(document).ready( function(){
GetAnnouncementData();
});

</script>
<a href="#" onclick="GetAnnouncementData()">Test</a>
<ul id="AnnouncementData"></ul>

[/code]

Currently rated 4.0 by 3 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

JQuery within SharePoint

We have started to do a lot of work with JQuery to simplify the development process. For those that have not come across JQuery before, it is  " a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript ". The ability to select multiple items on a page with a single line of script is great. For deployment, the library is simply a single  .js file that needs to be put onto the server and referenced on a page.

Aside from the core JQuery library, there are hundreds of plugins (additional script files) such as JQuery UI.

As a starting point, look at Jan Tielens article.

One of the exciting things for me about using this technology is the ability to use on hosted, or shared SharePoint servers (where as a developer you cannot add .dll files, features or solutions). To implement jQuery on a page in this scenario, we could upoad the library (jquery-1.3.2.js) into a document library, add a Content Editor Webpart onto a page then edit the webpart to reference the file and start using it. Imagine, with a Content Editor Web Part and a few script libraries, we could implement a tabbed style webpart, loading data from our lists :)

I'm planning on putting a short series of JQuery articles and links here over the coming weeks

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

A public update for the Service Pack 2 expiration date issue is now available

Over on the SharePoint Team blog they have published details of an update that resolves the product expiration issue with SP2. A quick quote from their blog:

The update can be applied before or after Service Pack 2 installation.  If the update is applied prior to installing Service Pack 2 it will prevent the expiration date from being improperly activated during installation of Service Pack 2, if it is applied after Service Pack 2 it will remove the expiration date incorrectly set during installation of Service Pack 2.

Also they plan on releasing an updated SP2 package that doesn't exhibit this problem, time to update my slipstreamed install sources...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Remember that the XSLT select is case sensitive...

I was customising a people search result web part this week and couldn't figure out why the mobile phone field was not rendering in the results. I could see it was in the AD properties, was making it through user profile import and then helped it through to managed metadata in the search results, I even checked the raw XML for the search results which showed it there as well. So I was down to checking my XSLT, I had camel cased the name of the field in my select code, as is my habit with coding to make it easily readable, but the XSLT was looking to match the case returned by the search results which was all in lower case.

A quick crrection and refresh and they all appeared as they should. Another little puzzle solved...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Using [Today] or [Me] in SharePoint calculated columns

If you try this in the browser you will get a message alon the line of Calculated columns cannot contain volatile functions like Today and Me'. At this point you go D'Oh!

But.... you can !!!

Before creating your calculated column you will need to create a column called Today or Me (depending on the calculation you want to create). Once this has been created, SharePoint lets you use the [Today] or [Me] functions in the calculation.

This example shows how to create an age calculated column.

[code:c#]

1. In your SharePoint list, create a column, title = DOB, type = Date, format = date only.

2. Create a column, title = Today, type = text.

3. Create a column, title = Age, type = calculated, calculation = DATEDIF([DOB],[Today],"Y")

4. Delete the column titled 'Today'

Now add a new item to the list. Set the DOB date (to somewhere in the past!) and save. The Age should have now been correctly calculated in Years.

[/code]

Note that once you have deleted the Today or Me column, if you try to edit the calculation in the future, SharePoint will complain again. However, you can simply create another column (Today or Me), edit your calculation, then Delete teh today / Me column again.

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

SharePoint service Pack 2 bug

SharePoint SP2 will expire 180 after implementation of the service pack.

Taken from the SharePoint team blog ....

"During the installation of SP2, a product expiration date is improperly activated. This means SharePoint will expire as though it was a trial installation 180 days after SP2 is deployed. The activation of the expiration date will not affect the normal function of SharePoint up until the expiration date passes. Furthermore, product expiration 180 days after SP2 installation will not affect customer’s data, configuration or application code but will render SharePoint inaccessible for end-users"

A KB article has been released on this and a fix is being worked on quickly!

We all make mistakes ... Embarassed

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Add the BIN folder to the path environment variable with powershell

I often go to execute a stsadm command and find it is not in the path on the server I am working on, so I looked for a while of a way of adding it permanently through powershell and then realised it's a straightforward task with .NET code. The following will add the BIN folder within the program files structure to the PATH environment variable at local machine level so that all users will benefit.

   1:  $envpath = [environment]::GetEnvironmentVariable("Path","Machine")
   2:  $binpath = $env:Programfiles + "\Common Files\Microsoft Shared\web server extensions\12\BIN"
   3:  if ($envpath.contains($binpath) -ne $true ) {
   4:  $envpath = $envpath + ";" + $binpath
   5:  [environment]::SetEnvironmentVariable("Path",$envpath,"Machine")
   6:  Write-output "BIN Path added."
   7:  }
   8:  else
   9:  {
  10:  Write-output "BIN Path already added."
  11:  }

I have added a check to not add it if it is already present as the traditional method of using

SET PATH=%PATH%;C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN

ends up with multiple copies of the BIN path in the variable and only applies for the current session.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

owssvr.dll - Beware of multiple selection lookups

owssvr.dll can be used in InfoPath projects to provide filtered or cascading drop down lists. Use an XML datasource - the syntax is http://yourserver/yourweb/_vti_bin/owssvr.dll?Cmd=Display&List={guid}&XMLDATA=TRUE.

However, beware if your list contains a lookupfield that allows multiple selections. If you have this, then the above syntax will return an invalid XML, or a blank data set.

List contains lookup field(s) with single selection - syntax works.
List contains lookup field(s) with multiple selection - syntax fails.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

 

Dilbert of the day