A place for Sharepoint and rantings
Archive for February, 2009
SPUtility.SendEmail Function truncates text
Feb 10th
It would appear that
SPUtility.SendEmail function truncates the body of the email. I’m having this problem and so is someone else (here).Not much more to add here, if anyone knows why or knows of a setting, love to here it
(please don’t post a workaround solution using .Net objects we can all figure that one out for ourselves thanks.)
Word of the day.
Damn.
Technorati Tags: sharepoint,wssWSS – CAML and XSD schemas
Feb 10th
If you developing List Schemas drop what your doing and go and install this.
It is an expanded wss.xsd file containing a lot of descriptions and possible default values. When coding in Visual Studio using this will alter the schema defs and give you uber intellisense on your schema files.
If you already use wss.xsd in Visual Studio you will need to remove your reference.
Now if you forgot how you did that then the usual way I found of configuring it was to goto
C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas
(or equivalent for your platform)
An to create a file called wsscatalog.xml, you may have called it something else but it contains xml like this
1: <SchemaCatalog xmlns="http://schemas.microsoft.com/xsd/catalog">
2: <Schema href="%CommonProgramFiles%/Microsoft Shared/web server extensions/12/TEMPLATE/XML/wss.xsd"
3: targetNamespace="http://schemas.microsoft.com/sharepoint/" />
4: </SchemaCatalog>
So go and remove that before installing this version as it won’t remove it for you and Studio can fight over things if you don’t or just not work at all as was my case.
Technorati Tags: wss,visual studio,caml,intellisenseWSS – ListView / Schema.xml and Embedding Javascript
Feb 9th
Many of you out there in SharePoint land will from time to time have the need to edit a list definitions schema.xml file to create your custom list. You may also have need to edit the List View in that schema file to create a different kind of view, one not possible to create by the SharePoint UI.
I have had need to do this recently. I needed a List View that highlighted expired items or tickets in my list. It needed to make them go red.
Now you might think that’s easy enough create a calculated field that does date maths on the date you have in the list item and the current date that gives basically 1 or 0 for expired or not. Well you’d be wrong. You see you can’t use [Today] or anything like it in a calculated field the list wants fixed not dynamic values in it and will not allow Dynamic values, think about it, it would seriously effect performance.
Rather than create a DataViewWebPart based on my list view and edit that to death, it did not give me exactly what I required, even with editing, and the time to do it would be longer for More >
WSS SharePoint and Powershell
Feb 6th
This is just a quick note to ask the question
Are you using Powershell when developing your WSS application ?
Cos if your not your missing a trick.