Posts

Caml Query with Lookup field

<Query>   <Where>     <Eq>       <FieldRef Name='Fruit' />       <Value Type='Lookup'>Grapes</Value>     </Eq>   </Where> </Query> <Query>   <Where>     <Eq>       <FieldRef Name='Fruit' LookupId='TRUE' />       <Value Type='Lookup'>15</Value>     </Eq>   </Where> </Query>

SharePoint Custom webpart with SharePoint resource files

Image
Step 1: First we need to create the visual webpart project in visual studio 2010. Step 2: After adding the visual webpart project, in the solution explorer, right click and add new sharepoint mapped folder and refer the folder Resources. Once the resource folder is mapped, right click and add the folder (since so many resource files are present in the 14\Resource folder used by sharepoint and we create our own folder and use it for the particular webpart /particular web application ). Lets call the folder as CustomResource folder. Step 3: Now add the resource file by right click on the CustomResource folder and add new item, select c#, and select the resource file, name it as CustomResource.resx Step 4: Add Empty Element named " App_GlobalResources" Step 5: In Solution Explorer, click on Show All Files icon to view all files. Open SharePointProjectItem.spdata files located under App_GlobalResources node. Add the relavent information to the xml file which includes ...

How to add ListItem to List, "Person or Group" column

        SPWeb website = SPControl.GetContextWeb(Context);         SPList oList = website.GetList("/Lists/Team%20Members");                 SPListItem item = oList.Items.Add();         SPUser user;         website.AllowUnsafeUpdates = true;          user = website.SiteUsers["MOSSDEV1\\abc"];         item["Member"] = user;         item.Update();         website.AllowUnsafeUpdates = false;

Adding custom icon to Web Part and Feature

Add an “Images” mapped folder Right-click on your project and navigate to Add menu option Click on SharePoint “Images” Mapped Folder Import images Then : <Feature xmlns=" http://schemas.microsoft.com/sharepoint/ "          ImageUrl="SharePoint.Demo/FeatureIcon.png"> </Feature> Ref : http://ricardoramirezblog.wordpress.com/2013/02/28/adding-custom-icon-to-web-part-and-feature-2/

SPDataSource CAML Query apply RowLimit

<SelectParameters>         <asp:Parameter Name="ListName" DefaultValue="Training Information" />         <asp:Parameter Name="WebUrl" DefaultValue="/sites/lms" />         <asp:Parameter Name="MaximumRows" DefaultValue="2"/> </SelectParameters>

SharePoint 2013 : My Site We're almost ready Error

http://sharepoint2013puri.blogspot.com/  

SQL Server configure enable xp_cmdshell

EXEC sp_configure 'show advanced options', 1 GO RECONFIGURE GO EXEC sp_configure 'xp_cmdshell', 1 GO RECONFIGURE GO