Click here for Heather Solomon's Sharepoint 2007 CSS bible
http://www.heathersolomon.com/content/sp07cssreference.htm
Thursday, August 12, 2010
Wednesday, August 11, 2010
Get the GUID of a SharePoint List
I usually adopt this easy way of finding the GUID of a SharePoint List:
Go to the List or Library settings --> then right-click on the “Audience targeting settings” or “Information management policy settings” links and choose Copy Shortcut.
Paste this Copied Shortcut in a notepad.
You get a URL like this:
http://stdemo:36068/eaTest/_layouts/ListEnableTargeting.aspx?List={d50cb13c-4cf2-4569-9e5c-b9363c39bdb9}
The one in bold red between the braces is your List GUID
Go to the List or Library settings --> then right-click on the “Audience targeting settings” or “Information management policy settings” links and choose Copy Shortcut.
Paste this Copied Shortcut in a notepad.
You get a URL like this:
http://stdemo:36068/eaTest/_layouts/ListEnableTargeting.aspx?List={d50cb13c-4cf2-4569-9e5c-b9363c39bdb9}
The one in bold red between the braces is your List GUID
Updating a SharePoint List Item with a LookUp Column
I got this error
"Invalid data has been used to update the list item. The field you are trying to update may be read only" when I was trying to Update a List with a LookUp column called "Group".
This column looked up values from another list. The solution was to update the ID of the lookup column and it worked .
Here is the code snippet for the above:
SPList lst = listWeb.Lists[listName];
//Get the items of the list
SPListItem item = lst.Items.GetItemById(ItemID);
//Set the item of the list to the corresponding Group Name from the "LookUp" list .Note Group1 is the Internal name of the column Group
item["Group1"] = intGroupID;
listWeb.AllowUnsafeUpdates = true;
//The argument false for SystemUpdate informs the SPObject Model not to increment versions
item.SystemUpdate(false);
listWeb.AllowUnsafeUpdates = false;
"Invalid data has been used to update the list item. The field you are trying to update may be read only" when I was trying to Update a List with a LookUp column called "Group".
This column looked up values from another list. The solution was to update the ID of the lookup column and it worked .
Here is the code snippet for the above:
SPList lst = listWeb.Lists[listName];
//Get the items of the list
SPListItem item = lst.Items.GetItemById(ItemID);
//Set the item of the list to the corresponding Group Name from the "LookUp" list .Note Group1 is the Internal name of the column Group
item["Group1"] = intGroupID;
listWeb.AllowUnsafeUpdates = true;
//The argument false for SystemUpdate informs the SPObject Model not to increment versions
item.SystemUpdate(false);
listWeb.AllowUnsafeUpdates = false;
Monday, August 2, 2010
Add Ajax 3.5 support in SharePoint
Here is an excellent link to add Ajax 3.5 support in SharePoint 2007. The author has detailedd the changes to the web.config
http://www.zimmergren.net/archive/2008/09/22/how-to-get-up-and-running-with-net-3-5-in-your-sharepoint-environment.aspx
http://www.zimmergren.net/archive/2008/09/22/how-to-get-up-and-running-with-net-3-5-in-your-sharepoint-environment.aspx
Subscribe to:
Posts (Atom)