web 2.0

My troubles with a Toshiba Laptop

is here....(Click)

Tags:

Service Pack 2 for Microsoft Office Server 2007 released

Service Pack 2 for 2007 Microsoft Office Servers - Description here: http://support.microsoft.com/?kbid=953334

Download from: http://www.microsoft.com/downloads/details.aspx?FamilyId=B7816D90-5FC6-4347-89B0-A80DEB27A082&displaylang=en

Fixes for Project Server 2007 include:

Microsoft Office Project Server
  • Modifies the queue service to prevent it from using large volumes of memory over long periods.
  • Improves the performance of certain database table indexes.
  • Improves cost resource functionality. For example, the server now correctly handles tasks that have material or work resources assigned to the same task.
  • Improves certain areas such as resource plans, build team, and the server scheduling engine.

 

List's column internal name - Update

An easier way to get the internal name of a List Item field (than the one mentioned here) is by using the 'Internal Name' property of an item field.

For example:

SPList spList = spWeb.Lists["List Name"];

string fieldInternalName = spList.Fields["Field Name"].InternalName

This will give you the internal name of the column in the list. The internal name is used in CAML queries while querying on a column in the list.

This means you don't have to bother converting your List column name special characters to get the internal name, since you get the internal name that has already converted the special characters for you.

Tags: ,

CAML | Lists

Service pack 2 for the 2007 Microsoft Office System due to ship April 28th

SP 2 for the 2007 Microsoft Office System is to be released on April 28th, 2009. Here's what they promise will improve in Project Server 2007:

  • Better memory management in the queue service.
  • Performance to certain database table indexes is improved.
  • Resource plans, build team, cost resources, and the server scheduling engine have improved.


On WSS 3.0 and MOSS:

Windows SharePoint Services 3.0 SP2 and Microsoft Office SharePoint Server SP2 include fixes and enhancements designed to improve performance, availability, and stability in your server farms. SP2 provides the groundwork for future major releases of SharePoint Products and Technologies.

An STSADM command line that scans your server farm to establish whether it is ready for upgrade to the next version of SharePoint and provides feedback and best practice recommendations on your current environment.
SP2 offers support for a broader range of Web browsers.



Source

 

List's column internal name

Update: An easier method to extract a List Column's internal name is mentioned here. Click to open

Sharepoint list columns have an internal as well as external name to them. The external name is visible to the user, whereas, the internal name is used by sharepoint and never changes once it has been created, no matter how many times the external name is changed.

Some special characters used as a column name is converted to a special code which involves prefixing the values '_x' and '_' to the front and end of the special character's UTF-16 value.

Tool to view the special character's UTF-16 value

Function to convert these special characters...... (Thanks to Abstract Spaces for list of column name special characters)

 

        public static string ConvertSpecialColumnNameCharacters(string stringToConvert)

        {

            stringToConvert = stringToConvert.Replace("~","_x007e_");

 

            stringToConvert = stringToConvert.Replace("!","_x0021_");

 

            stringToConvert = stringToConvert.Replace("@","_x0040_");

 

            stringToConvert = stringToConvert.Replace("#","_x0023_");

 

            stringToConvert = stringToConvert.Replace("$","_x0024_");

 

            stringToConvert = stringToConvert.Replace("%","_x0025_");

 

            stringToConvert = stringToConvert.Replace("^","_x005e_");

 

            stringToConvert = stringToConvert.Replace("&","_x0026_");

 

            stringToConvert = stringToConvert.Replace("*","_x002a_");

 

            stringToConvert = stringToConvert.Replace("(","_x0028_");

 

            stringToConvert = stringToConvert.Replace(")","_x0029_");

 

            stringToConvert = stringToConvert.Replace("_","_x005F_");

 

            stringToConvert = stringToConvert.Replace("+","_x002b_");

 

            stringToConvert = stringToConvert.Replace("-","_x002d_");

 

            stringToConvert = stringToConvert.Replace("=","_x003d_");

 

            stringToConvert = stringToConvert.Replace("{","_x007b_");

 

            stringToConvert = stringToConvert.Replace("}","_x007d_");

 

            stringToConvert = stringToConvert.Replace(":","_x003a_");

 

            stringToConvert = stringToConvert.Replace("“","_x0022_");

 

            stringToConvert = stringToConvert.Replace("|","_x007c_");

 

            stringToConvert = stringToConvert.Replace(";","_x003b_");

 

            stringToConvert = stringToConvert.Replace("‘","_x0027_");

 

            stringToConvert = stringToConvert.Replace("\\","_x005c_");

 

            stringToConvert = stringToConvert.Replace("<","_x003c_");

 

            stringToConvert = stringToConvert.Replace(">","_x003e_");

 

            stringToConvert = stringToConvert.Replace("?","_x003f_");

 

            stringToConvert = stringToConvert.Replace(",","_x002c_");

 

            stringToConvert = stringToConvert.Replace(".","_x002e_");

 

            stringToConvert = stringToConvert.Replace("/","_x002f_");

 

            stringToConvert = stringToConvert.Replace("`","_x0060_");

 

            stringToConvert = stringToConvert.Replace(" ","_x0020_");

 

            return stringToConvert;

        }

Tags:

Lists

CAML query for retrieving ListItems where fieldType is 'User'

Had a hard time searching for a CAML query to retrieve ListItems where Column Type was 'Person or Group'. The below piece of code will retrieve ListItems containing the user based on the user's Display name. I'm still looking for a way to search based on the user's Logon Name 

string camlQuery = "<Where><Eq><FieldRef Name='User_x0020_Name'/><Value Type='User'>" + userDisplayName + "</Value></Eq></Where>"

SPList spList = spWeb.Lists["List Name"];

SPQuery spQuery = new SPQuery(spList.Views["All Items"]); 

spQuery.Query = camlQuery;

SPListItemCollection listItemCollection = spList.GetItems(spQuery);

  

Update: Lists can be searched on the Logon Name if the Type of Display for the 'Person or Group' Column type is changed to 'Account' (which basically displays the Logon Name in the 'DOMAIN NAME\Logon Name' format)

Tags: ,

CAML | Lists

Sharepoint Lists - Hide list column in the New Item (NewForm.aspx) page

To hide a column in the 'NewForm.aspx' from a user when he/she creates a new list item, Go to 'Settings' -> 'List Settings', under the 'General Settings' section, click on 'Advanced Settings'. Set the value of 'Allow Management of content Types' to 'Yes'. Click on OK and return to the 'Settings' page. There will be a new section - the 'Content Types' section. In the 'Content Type' column below, click on 'Item', click on the column that you wish to hide, in the 'Column Settings' section, choose the 'Hidden (Will not appear in forms)' option and click on the OK button.

This will prevent the user from seeing the column in the new item page.

Sharepoint Workflow CreateTask CorrelationToken OwnerActivityName scope

Since Tasks created in a Sharepoint Workflow are only controllable in it's own Parent State, it's a good idea to set the task's CorrelationToken OwnerActivityName to it's Parent State.

Setting the Correlation Token Owner Activity name to the main Workflow State (above the task's Parent state) could result in the Workflow locking the task while changes are made to it through the code.

Project Server 2007 - Modifying the 'Select Task' Web page dialog

The 'Select Task' dialog box that pops ups when the 'Add Lines' button is clicked can be modified by editing the 'SelectTaskDlg.aspx' page located in 'C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\PWA\TIMESHEET'.

Write your own javascript, or add your own values to the controls.

The ID for the HtmlSelect control containing the existing assignments is 'idAssnDropdown', for the control containing the name of the new timesheet line(s), the ID is 'idAssnNew'. The ID for the control containing the Line classification is 'idTSLineClassDropdown'. The ID for the control containing the Comment is 'idComment'.

The values for the controls can be modified during the 'LoadComplete' or 'Pre Render' event.

 The page uses the 'Microsoft.Office.Project.PWA.ApplicationPages.SelectTaskDlgPage' class as the code behind which in turn is derieved from the 'PJDlgPage' class 'Microsoft.Office.Project.PWA' dll

The 'SelectTaskDlgPage' class.....

 

   23 public class SelectTaskDlgPage : PJDlgPage
   24     {
   25         // Fields
   26         protected Guid _tsUID;
   27         protected HtmlSelect idAssnDropdown;
   28         protected HtmlSelect idTSLineClassDropdown;
   29 
   30         // Methods
   31         public override void PJDlgPage_OnLoad(EventArgs e)
   32         {
   33             // This item is obfuscated and can not be translated.
   34         }
   35 
   36         // Properties
   37         public override Guid PageUID
   38         {
   39             [SharePointPermission(SecurityAction.Demand, ObjectModel = true)]
   40             get
   41             {
   42                 return PageGuid.SelectTaskDlg;
   43             }
   44         }
   45     }

 Unfortunately, the 'PJDlgPage_OnLoad' function is obfuscated, which prevents us from seeing the real workings of this function. 

Is any modification to this page supported by Microsoft ? I really doubt it. Modify this page at your own risk ! :)