Category Archives: sharepoint

Migrate Lotus notes to SharePoint 2010-Session in Oct Event

Guys,

who have attended our last SharePoint Techies User Group Event. One of our speaker Ali Zia, promised to share over all cycle to migrate Lotus notes to SharePoint 2010

you can follow the link below

http://www.synoverge.com/solutions-sharepoint-migration-framework.html


How to find the Listitem metadata info Client Object Model

Yesterday, some one on my last blog   Two ways to Upload file from Client Object Model , asked how to find out the metadata info of the file from COM.

So the following code  give you the general idea how to find out that metadata info of the file from Client Object Model


ClientContext cc = new ClientContext("http://server:5421");
Web web = cc.Web;
cc.Load(web);
cc.ExecuteQuery();
string webName = web.Title;
string uploadLocation = string.Empty;

List list = cc.Web.Lists.GetByTitle("Documents");
cc.Load(list);
cc.Load(list.ContentTypes);
cc.Load(list.Fields);
ListItem item;

// this is how you can get the item(file), you can also use CAML query
cc.Load(item = list.GetItemById(22));

//here you can get the dictonary for fieldvalue
cc.Load(item.FieldValuesAsText);
cc.ExecuteQuery();

string createdby = item.FieldValuesAsText["Created_x0020_By"];
string modifiedby = item.FieldValuesAsText["Modified_x0020_By"];

Enjoy 🙂

Happy SharePointing 🙂


Spider acknowldege SharePoint site www.fcpakistan.com

Guys,

Some weeks back, i finished a project named as Food Connection Pakistan. Its a SharePoint 2010 internet facing site, which got some finest branding and functionality. Even Pakistan famous IT Magzine Spider has some thing to say about this project.

” FC Pakistan is a promising entry on the Web . It has the potential of becoming the ultimate local food guide, provided it works out the kinks.”

To read full article follow this link. http://www.fcpakistan.com/fcblog/newpost.aspx?ID=40

Moreover this site stands tall among the rest of SharePoint site in the month of August 2011 at http://www.TopSharepoint.com,

you can read an article about this as well, through this link http://www.fcpakistan.com/fcblog/newpost.aspx?ID=40

It is very nice to see that despite all these mishaps we face in Pakistan, we usually come up some thing different in every aspect of life.

Regards,

Happy SharePointing


Two ways to Upload file from Client Object Model

Hi Guys,

Just  a quick example, Take a scenario that you are creating an Application (in our case WinForm Application). and you want to upload a document to document library from that application, there are two ways to do, One is to upload from filecreation and the other one is to directly upload with file.savebinary method.

public void uploadfile(string siteurl,string fileName,string libraryName, string subfolderPath)
{

using (ClientContext clientContext = new ClientContext(siteUrl))
{

string uploadLocation = string.Empty;
if (!string.IsNullOrEmpty(
subfolderPath))
{uploadLocation = string.Format("/{0}/{1}/", libraryName, subfolderPath);}
else
{
uploadLocation = string.Format("/{0}/", libraryName);
}

#region Upload through filecreation
var fileCreationInformation = new FileCreationInformation();

byte[] bytefile = System.IO.File.ReadAllBytes(fileName);
fileCreationInformation.Content = bytefile;
fileCreationInformation.Overwrite = true;
uploadLocation = uploadLocation + Path.GetFileName(fileName);
fileCreationInformation.Url = uploadLocation;

list.RootFolder.Files.Add(fileCreationInformation);
clientContext.ExecuteQuery();
#endregion

#region Uploading directly
using (FileStream fs = new FileStream(fileName, FileMode.Open))
{

Microsoft.SharePoint.Client.File.SaveBinaryDirect(clientContext, uploadLocation, fs, true);

}

#endregion

}

}

 

Please don’t forget to cast your opinion below about this blog
Cheers,
Happy SharePointing,

Default row limit of FullTextQuery or KeyWord Search

Guys,

Working on search, itself quite challenging but while one is coding against the search API, make the life more miserable.

There is a scenario happen to me recently, while working with  Full Text Query search, my result set remains to be less then 50 rows, which is very suspicious, search crawler working fine plus the search center shows the result nicely, so so..

I have just changed the row limit for my FullTextQuery to 2000 and bingo.

So the lesson from this always check the row limit, and keep to maximum, because 50 is not a good number when you are doing any listing work.

Regards,

Shakir Majeed Khan


SharePoint icon for browser (favicon)

For one of the project i got a task to place the site icon for the browser, after couple of search,

found this article

 

https://www.mriwm.com/Public/PamBlog/Lists/Posts/Post.aspx?ID=41

 

Cheers,