Tuesday, October 13, 2009

SharePoint WebService Example getlistitems() and getlist()

You can see Here the examples for adding, updating and retrieving Listitems using Web services.

SharePoint Webserives get choice field values

XmlNode ndLists = Service.GetList("List"); //List name

XmlDocument doc = new XmlDocument();
doc.LoadXml(ndLists.OuterXml);

XmlNamespaceManager mg = new XmlNamespaceManager(doc.NameTable);
mg.AddNamespace("sp", "http://schemas.microsoft.com/sharepoint/soap/");
mg.AddNamespace("z", "#RowsetSchema");
mg.AddNamespace("rs", "urn:schemas-microsoft-com:rowset");
mg.AddNamespace("y", "http://schemas.microsoft.com/sharepoint/soap/ois");
mg.AddNamespace("w", "http://schemas.microsoft.com/WebPart/v2");
mg.AddNamespace("d", "http://schemas.microsoft.com/sharepoint/soap/directory");

XmlNodeList FieldsInList = doc.SelectNodes("//sp:Field", mg);

foreach (XmlNode Field in FieldsInList)
{
if (Field.HasChildNodes)
{
if (Field.Attributes["Name"].Value == "choiceFieldName") //choice fields internal name
{
foreach (XmlNode node in Field.ChildNodes)
{
if (node.HasChildNodes)
{
foreach (XmlNode Newnode in node.ChildNodes)
{
if(Newnode.HasChildNodes)
{
string value = Newnode.InnerText; // get node value to datatable
} } } } } } } }

Basic Sharepoint Video Tutorials

Here are some video tutorials for customization of sharePoint site. ( its for beginners)

Sunday, September 13, 2009

SharePoint 2010 For Developers

Ok firstly, to develop custom components in sharepoint we need a VS 2010 and Designer 2010... . Well not sure about this though!

So, We have lot of new stuff to paly with like a designer view for Webparts and also for creating BDC connections( thats awsome!) And also an integrated support for VS TFS including source code control and team build capabilities.

You can check out the Demo videos on the link below.

My fav, is Client Object Model ( donn know how good it will be!)
Ok, so this will allow you u run the code at client side with local object model and gets data from sharepoint server . Well, i had a hard time once calling lists.asmx with Javascript to run the code on client side.

Please check out the whole new demo videos and stuff Here

Sunday, July 12, 2009

Add lookup field with data from parent site

If you need data from a list which is in parent site, in your subsite as lookup, first go to the parent site and create a new site column as lookup type and the list you need the data from. Now go to the subsite and in the list settings add a site column to add the above created lookup column.