There is a funny thing in SharePoint (in all versions)
1) List
With normal list the URL like http://server_name/site_name/Lists/List_Name
With documents list the URL like http://server_name/site_name/List_Name
2) Site
With normal site, all lists have the full controls on the list such as deleting, saving template,...
With blog site, the Posts list does not have permission to delete or save as the template and after save the blog site as template, we cannot restore the site correctly. All views of Posts list are generated as a list with the same name.
Showing posts with label SharePoint 2007. Show all posts
Showing posts with label SharePoint 2007. Show all posts
Monday, October 10, 2011
Monday, January 24, 2011
How to get all items of Discussion Board list using Web Service.
Hello everybody,
I am working on Discussion Board list using Web Service. I am so supprised that the DB list is not the same as another list in SharePoint. The first sign of my mind is Calendar List Item, SharePoint stores the StartDate & EndDate with a different ways. To get the correctly data, we must understand clearly about architecture of Calendar list.
For now, the problem about Calendar was solved and faced to another problem. Discussion Board list has 2 item types: Dicussion (threads) and Message (replies). When you get all items by normaly, you only get the discussion items, take a look at code:
XmlDocument document = new XmlDocument();
XmlNode query = document.CreateNode(XmlNodeType.Element, "Query", "");
XmlNode viewFields = document.CreateNode(XmlNodeType.Element, "ViewFields", "");
XmlNode queryOptions = document.CreateNode(XmlNodeType.Element, "QueryOptions", "");
queryOptions.InnerXml = "<ViewAttributes Scope='RecursiveAll'/>";
Lists lists = new Lists(URL_SERVER);
lists.Credentials = CredentialCache.DefaultCredentials;
XmlNode node4 = lists.GetListItems(sourceList, "", query, viewFields, "", queryOptions);
Okey, even thought Scope attribute is set to "RecursiveAll", and SharePoint 2007 works fine. All items including reply items are list. But it does not work in SharePoint 2010, so it is not actually difficult to fix for SharePoint 2010. Just update your query CALM like the code below:
query.InnerXml = @"<Query>
<Where>
<Geq>
<FieldRef Name=""DiscussionLastUpdated"" />
<Value Type=""DateTime"">1900-01-01T00:00:00Z</Value>
</Geq>
</Where>
</Query>";
Yes, that's it.
I am working on Discussion Board list using Web Service. I am so supprised that the DB list is not the same as another list in SharePoint. The first sign of my mind is Calendar List Item, SharePoint stores the StartDate & EndDate with a different ways. To get the correctly data, we must understand clearly about architecture of Calendar list.
For now, the problem about Calendar was solved and faced to another problem. Discussion Board list has 2 item types: Dicussion (threads) and Message (replies). When you get all items by normaly, you only get the discussion items, take a look at code:
XmlDocument document = new XmlDocument();
XmlNode query = document.CreateNode(XmlNodeType.Element, "Query", "");
XmlNode viewFields = document.CreateNode(XmlNodeType.Element, "ViewFields", "");
XmlNode queryOptions = document.CreateNode(XmlNodeType.Element, "QueryOptions", "");
queryOptions.InnerXml = "<ViewAttributes Scope='RecursiveAll'/>";
Lists lists = new Lists(URL_SERVER);
lists.Credentials = CredentialCache.DefaultCredentials;
XmlNode node4 = lists.GetListItems(sourceList, "", query, viewFields, "", queryOptions);
Okey, even thought Scope attribute is set to "RecursiveAll", and SharePoint 2007 works fine. All items including reply items are list. But it does not work in SharePoint 2010, so it is not actually difficult to fix for SharePoint 2010. Just update your query CALM like the code below:
query.InnerXml = @"<Query>
<Where>
<Geq>
<FieldRef Name=""DiscussionLastUpdated"" />
<Value Type=""DateTime"">1900-01-01T00:00:00Z</Value>
</Geq>
</Where>
</Query>";
Yes, that's it.
Sunday, August 15, 2010
A simple way to install a SharePoint Farm server.
A SharePoint Farm includes many SharePoint server join into the server which is hosting the Central Admin. However, the servers which joined into the server also can host the Central Admin. A SharePoint Farm only use one a SQL box and can share the resources, data, security,...
This is a simple way to install a sharepoint farm with a highest security and make your server to be safer.
Before installing the farm, create 2 accounts in domain named sqlaccount and spinstaller
Prepare 3 computers: C1, C2 and C3.
We will install MS SQL on C1, SharePoint server hosts Central Admin on C2 and a child server on C3 to join in C2.
Step 1: Login on C1 by Administrator (Local Admin) and install SQL Server
Step 2: Login on C2 by Administrator (Local Admin) and add the account spinstaller into Local Administrators Group.
Step 3: Login on C2 again by spinstaller to install SharePoint. Remember to select Web Front-End option when you install SharePoint.
Step 4: After the installing progress finish, run the SharePoint configuration wizard, type the SQL Server name, database name and use sqlaccount to config the SharePoint.
Step 5: Login on C3 by spinstaller (also add this account into Local Administrators Group) to install SharePoint and select Web Front-End option.
Step 6: Run the SharePoint configuration wizard on C3. At this time, the wizard will ask you to install the new server or connect to existed server. Click on Connect to Existed server. Type the SQL Server and lick Retrieve database, you will get the SharePoint_Config database (that is already existed on C1), type the account sqlaccount to wizard finish the configuration.
That's all. Good luck.
This is a simple way to install a sharepoint farm with a highest security and make your server to be safer.
Before installing the farm, create 2 accounts in domain named sqlaccount and spinstaller
Prepare 3 computers: C1, C2 and C3.
We will install MS SQL on C1, SharePoint server hosts Central Admin on C2 and a child server on C3 to join in C2.
Step 1: Login on C1 by Administrator (Local Admin) and install SQL Server
Step 2: Login on C2 by Administrator (Local Admin) and add the account spinstaller into Local Administrators Group.
Step 3: Login on C2 again by spinstaller to install SharePoint. Remember to select Web Front-End option when you install SharePoint.
Step 4: After the installing progress finish, run the SharePoint configuration wizard, type the SQL Server name, database name and use sqlaccount to config the SharePoint.
Step 5: Login on C3 by spinstaller (also add this account into Local Administrators Group) to install SharePoint and select Web Front-End option.
Step 6: Run the SharePoint configuration wizard on C3. At this time, the wizard will ask you to install the new server or connect to existed server. Click on Connect to Existed server. Type the SQL Server and lick Retrieve database, you will get the SharePoint_Config database (that is already existed on C1), type the account sqlaccount to wizard finish the configuration.
That's all. Good luck.
Subscribe to:
Posts (Atom)