Monday 27 September 2010

CAML query for retrieving ListItems where fieldType is 'User'

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();

spQuery.Query = camlQuery;

SPListItemCollection listItemCollection = spList.GetItems(spQuery);

http://www.saturnvibes.com/SharepointProjectServer2007/post/2009/04/16/CAML-query-for-retrieving-ListItems-where-fieldType-is-User.aspx

Wednesday 22 September 2010

SharePoint: Internet Explorer'da Session Çalışmaması

Sorun: Diğer tarayıcılarda hiç bir sorun olmadan çalışan Session'ının IE'de çalışmaması. Problem, hostname olarak underscorelu bir isim verilmiş olmasından kaynaklanıyormuş.

Örnek: http://sharepoint_site

Çözüm:

SharePoint 2007: Central Administration > Operations > Alternate Access Mappings
SharePoint 2010: Central Administration > System Settings > Configure alternate access mappings

Add Internal URLs ->
Zone = Intranet
Save.

Referans:
http://vspug.com/sean/2007/07/11/internet-explorer-blocks-sharepoint-from-using-session-cookies/

Thursday 2 September 2010

To interact with SharePoint projects in Visual Studio, your system user account must have administrator privileges.

Problem:










Solution:
Right-click Microsoft Visual Studio, and then click Run as administrator.