Monday, August 10, 2015

How to find that who deleted SQL Server database


From very good post here from "Jack Corbett"

http://www.sqlservercentral.com/Forums/Topic989304-391-1.aspx

Thursday, July 23, 2015

SharePoint sites : Access denied in chrome

Annoying right?

Works from Chrome Incognito but does't work with Chrome standard mode..

Just use following URL -
_layouts/closeConnection.aspx?loginasanotheruser=true

To close the current connection and loginasanother user.

https://support.microsoft.com/en-us/kb/2752600

Thursday, May 28, 2015

Set App Permission using Powershell

Add-PSSnapin "Microsoft.SharePoint.PowerShell"
$spw = Get-SPSite "http://server.domain.com"
$clientID = "86e47e56-f289-4f68-b832-58b0542e0c96"
$authRealm = Get-SPAuthenticationRealm -ServiceContext $spw
$spAppId = $clientID + "@" + $authRealm
$spAppPrincipal = Get-SPAppPrincipal -Site $spw.RootWeb -NameIdentifier $spAppId
Set-SPAppPrincipalPermission -Site $spw.RootWeb -AppPrincipal $spAppPrincipal -Scope SiteSubscription -Right FullControl

Wednesday, January 21, 2015

FBA pack for SharePoint 2013


https://sharepoint2013fba.codeplex.com/documentation

A forms based authentication pack for SharePoint 2013. It includes web parts for registering users, changing passwords and password recovery. It includes tools for managing users and roles and for approving registrations. 

More details here for FBA management features-

https://sharepoint2013fba.codeplex.com/


Thursday, December 18, 2014

Quick Rest Interface samples to reuse

SP2013
http:///site/_api/lists
http:///site/_api/web/title
http:///site/_api/lists/getbytitle('listname')
http:///site/_api/lists/getbytitle('listname')/items
http:///site/_api/lists/getbytitle('listname')?select=Title
http:///site/_api/lists/getbytitle('listname')/Lists (POST)
Body
{
'_metadata':{'type':SP.List},
'AllowContentTypes': true,
'BaseTemplate': 104,
'ContentTypesEnabled': true,
'Description': 'My list description',
'Title': 'RestTest'
}

http:///site/_api/lists/getbytitle('listname')/lists/getbytitle('listname')/items (POST)
Body
{
'_metadata':{'type':SP. listnameListItem},
'Title': 'MyItem'
}

SP2010
http:///_vti_bin/ListData.svc
http:///_vti_bin/ListData.svc/ListName
http:///_vti_bin/ListData.svc/$metadata
http:///sites//_vti_bin/listdata.svc/TestData(2)
http:///sites//_vti_bin/listdata.svc/TestData?$orderby=FieldName
http:///sites//_vti_bin/listdata.svc/TestData?$filter=FieldName eq 'testval'

References :
http://msdn.microsoft.com/en-us/library/office/jj164022(v=office.15).aspx
http://msdn.microsoft.com/en-us/library/office/ff521587(v=office.14).aspx

Tuesday, December 16, 2014

SharePoint Internal Load Balancing and Network load balancing

SharePoint Internal Load Balancing -  SharePoint internally manages service request load by its inbuilt "Application Discovery and Load Balancer Service". By default it works with Round Robin algorithm but can be customized as needed.

Network load balancing -
Also servers in the farm can be load balanced with pair of backup servers. In this case, if any of the server in SharePoint farm goes down the backup server will fill that up.

Came across few interesting links -

http://blogs.technet.com/b/meamcs/archive/2012/05/29/prepare-sharepoint-farm-part-3-prepare-nlb-for-sharepoint-web-front-end-wfe-servers.aspx

http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2014/01/10/network-load-balancing-for-sharepoint-2013-part-one-how-to-display-network-load-balancing-manager-in-windows-server-2008.aspx

https://www.martinhatch.com/2014/05/sharepoint-2013-reference-sheet-services-on-server.html

Monday, October 27, 2014

Add/Remove Dlls from GAC in Windows Server 2012

http://camerondwyer.wordpress.com/2013/05/22/how-to-install-a-dll-to-the-gac-on-windows-2012-using-only-powershell-without-having-to-install-sdk-or-visual-studio/

Recover SharePoint config database from Suspect/Recovery mode to online state

Follow the steps given below in sequence one after another-

Steps
1.
use master
EXEC sp_resetstatus 'SharePoint_Config';
2.
ALTER DATABASE SharePoint_Config SET EMERGENCY
3.
DBCC checkdb('SharePoint_Config')
4.
ALTER DATABASE SharePoint_Config SET SINGLE_USER WITH ROLLBACK IMMEDIATE
5.
DBCC CheckDB ('SharePoint_Config', REPAIR_ALLOW_DATA_LOSS)
6.
ALTER DATABASE SharePoint_Config SET MULTI_USER

Monday, August 4, 2014

Import ULS logs in Database


Sometime it is difficult to load huge amount of ULS logs in ULSviewers so the tool provide feature to import GBs of ULSLog files in database and use traditional SQLQuery to analyze it further.


http://spstools.codeplex.com/releases/view/93135

Wednesday, March 19, 2014

Windows Server 2012 - User access control settings


Grant local admin rights-

http://wp.sjkp.dk/windows-8-windows-server-2012-uac-grant-local-admin-rights/


Tuesday, November 5, 2013

Monday, March 25, 2013

Adding feature stapling to custom site tempalte.


Adding feature stapling to any custom site tempalte.

1. Add a new feature with feature stapling xml
2. Add following xml to element.xml file for that feature.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <FeatureSiteTemplateAssociation
  Id="2B78C8DE-4C07-4a18-A6A6-E9FE1AB7EE30"
  TemplateName="TestSiteTemplate#0"/>
</Elements>



Notes-
1. Please make sure that the newly added feature is part of the custom web template.

2. You can find out template name and ID (Ex. TestSiteTemplate#0 )in the xmls given at following path.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\1033\XML

Monday, January 7, 2013

SharePoint 2013

App App App... Everything is App

SP2013 changed drastically for developers due to its app model specifically, there are many other changes also there like social media, SkyDrive Pro, new APIs however the APP model have changed the way to design and deploy the features in SharePoint. Also, you can buy free or paid apps from Microsoft SharePoint 2013 app store.
Here the link- http://office.microsoft.com/en-us/store/apps-for-sharepoint-FX102804987.aspx

See references for more insight-
http://www.sharepointkings.com/2013/01/what-is-app-in-sharepoint-2013.html
http://www.sharepointnutsandbolts.com/2012/07/sharepoint-2013-my-view-on-whats-new.html

Tuesday, September 11, 2012

Site Provisioning : Webpart and Webpages


Different ways to provisioning webpart
===========================

There are many ways to add a webpart on a page like Web part can be provisioned using feature receiver(Using SP object model), webpart can be provisioned using different xml markups in ONET.xml. Here i want to describe few of the xml markup techniques to do the same.

1. Using AllUserView webpart
- Sample is as below


<AllUsersWebPart WebPartZoneID="Left" WebPartOrder="3>
          <![CDATA[
        <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
          <Assembly>Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
          <TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
          <Title>My Test Documents</Title>
          <Description>TestDocuments</Description>
          <FrameType>Standard</FrameType>
          <IsVisible>true</IsVisible>
        </WebPart>
      ]]>
        </AllUsersWebPart>


2. By creating LVWP using VIew element.
- Few of the approaches to do the same.
- Samples are as below A. and B.

A.
<View List="Lists/TestDocuments" BaseViewID="1" WebPartZoneID="Left" WebPartOrder="3" />

B. With properties

 <View List="Lists/TeamDocuments" BaseViewID="1" WebPartZoneID="Left" WebPartOrder="5">
        <![CDATA[
             <webParts>
             <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
             <metaData>
             <type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart,Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" />
             <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
             </metaData>
             <data>
             <properties>
             <property name="AllowConnect" type="bool">False</property>
             <property name="ChromeType" type="chrometype">TitleAndBorder</property>
             </properties>
             </data>
             </webPart>
             </webParts>
 ]]>
      </View>

C.
<View List="Lists/TestDocuments" BaseViewID="1" DisplayName="TestDocuments" Name="TestDocuments" RecurrenceRowset="TRUE" WebPartZoneID="Left" WebPartOrder="3">
          <![CDATA[
             <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
                  <Assembly>Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
                  <TypeName>Microsoft.SharePoint.WebPartPages.ListViewWebPart</TypeName>
                  <Title>Test Documents</Title>
               
             </WebPart>
      ]]>
   
  </View>

3. By using Binary Serialized Webpart -
Here is the steps for How to provision Binary Serialized Webpart

- Create a webpart page and Save the page into page/document library. Add webparts to the page.
- Save site as a template (NOTE - Do NOT include content while saving the site as template.)
- Download and Rename WSP file to CAB file and extract it
- Go to modules folder and fetch the module xml.
- Use the same module xml to create element xml while create module in Visual studio solution.


Thanks to - http://blogs.edwardwilde.com/tag/onet-xml/

Monday, August 27, 2012

Best Practice Alternative to overcome List view lookup threshold limitations

Recently, once again i have come across the List view lookup threshold limitation while designing a custom webpart. I can not use more than 8 lookup fields(it includes user fields too) in a single list view or while fetching the list data using SPQuery.

There is configuration in Central adminstration however as per Best practice it is not at all advisable. It hamper the Server cpu very badly. Please finds links below to know more about it.
http://sympmarc.com/2012/07/23/sharepoints-list-view-lookup-threshold-and-why-we-dont-change-it/
http://technet.microsoft.com/en-us/library/cc262813.aspx

So there are few options available to overcome this.

Option 1 - Reduce number of lookup fields in the view. (This is not possible all the time as per requirement)
Option 2 - Increase List View Look up Threshold for that webapplication in central admin. (This is not advisable as it hampers Server CPU badly.)

So i have implemented following option. Option 3-

- While query list data split them in to two or more query groups such that you dont query more than 8 lookup fields in a single query.
- Get different data sets based on different SPQuery. Just make sure you have ID column in all the query groups.
- Merge them using LINQ

Please find the implementations as below -
- While query list data split them in to two or more query groups such that you dont query more than 8 lookup fields in a single query.
 protected void Page_Load(object sender, EventArgs e)
        {

               SPList splistObject = objSPWeb.Lists["ListName"];
                    SPQuery spqPart1 = new SPQuery();
                    spqPart1.ViewFields = @"<FieldRef Name='Title' />
   <FieldRef Name='LookupFieldName1' />
   <FieldRef Name='LookupFieldName2' />
   <FieldRef Name='LookupFieldName3' />
   <FieldRef Name='LookupFieldName4' />
   <FieldRef Name='LookupFieldName5' />
   <FieldRef Name='LookupFieldName6' />
   <FieldRef Name='LookupFieldName7' />
    <FieldRef Name='ID' />";
                    spqPart1.ViewFieldsOnly = true;

                    SPQuery spqPart2 = new SPQuery();
                    spqPart2.ViewFields = @"<FieldRef Name='LookupFieldName8' />
   <FieldRef Name='LookupFieldName9' />
   <FieldRef Name='LookupFieldName10' />
   <FieldRef Name='LookupFieldName11' />
   <FieldRef Name='LookupFieldName12' />
   <FieldRef Name='LookupFieldName13' />
   <FieldRef Name='ID' />";
                    spqPart2.ViewFieldsOnly = true;


                      SPListItemCollection splicPart1 = splistObject.GetItems(spqPart1);
                        DataTable dtListPart1 = splicPart1.GetDataTable();

                        SPListItemCollection splicPart2 = splistObject.GetItems(spqPart2);
                        DataTable dtListPart2 = splicPart2.GetDataTable();

                        dtOppInfo = MergeDataTablesVertically(dtListPart1, dtListPart2);

}

- Get different data sets based on different SPQuery. Just make sure you have ID column in all the query groups.

- Merge them using LINQ
public DataTable MergeDataTablesVertically(DataTable table1, DataTable table2)
        {
            DataTable retTable = new DataTable();
            var dtMergeVertically =
    from part1 in table1.AsEnumerable()
    join part2 in table2.AsEnumerable() on part1.Field<Int32>("ID") equals part2.Field<Int32>("ID")
    select new
   {
       Title = part1.Field<String>("Title"),
       LookupFieldName1 = part1.Field<String>("LookupFieldName1"),
       LookupFieldName2 = part1.Field<String>("LookupFieldName2"),
       LookupFieldName3 = part1.Field<String>("LookupFieldName3"),
       LookupFieldName4 = part1.Field<String>("LookupFieldName4"),
       LookupFieldName5 = part1.Field<String>("LookupFieldName5"),
       LookupFieldName6 = part1.Field<String>("LookupFieldName6"),
       LookupFieldName7 = part1.Field<String>("LookupFieldName7"),
       ID = part1.Field<Int32>("ID"),


       LookupFieldName8 = part2.Field<String>("LookupFieldName8"),
       LookupFieldName9= part2.Field<String>("LookupFieldName9"),
       LookupFieldName10= part2.Field<String>("LookupFieldName10"),
       LookupFieldName11= part2.Field<String>("LookupFieldName11"),
       LookupFieldName12= part2.Field<String>("LookupFieldName12"),
       LookupFieldName13= part2.Field<String>("LookupFieldName13"),
   };
            retTable = ConvertToDataTable(dtMergeVertically);
            return retTable;

        }


        public DataTable ConvertToDataTable<T>(IEnumerable<T> varlist)
        {
            DataTable dtReturn = new DataTable();

            // column names
            PropertyInfo[] oProps = null;

            if (varlist == null) return dtReturn;

            foreach (T rec in varlist)
            {
                // Use reflection to get property names, to create table, Only first time, others will follow
                if (oProps == null)
                {
                    oProps = ((Type)rec.GetType()).GetProperties();
                    foreach (PropertyInfo pi in oProps)
                    {
                        Type colType = pi.PropertyType;

                        if ((colType.IsGenericType) && (colType.GetGenericTypeDefinition() == typeof(Nullable<>)))
                        {
                            colType = colType.GetGenericArguments()[0];
                        }

                        dtReturn.Columns.Add(new DataColumn(pi.Name, colType));
                    }
                }

                DataRow dr = dtReturn.NewRow();

                foreach (PropertyInfo pi in oProps)
                {
                    dr[pi.Name] = pi.GetValue(rec, null) == null ? DBNull.Value : pi.GetValue
                    (rec, null);
                }

                dtReturn.Rows.Add(dr);
            }
            return dtReturn;
        }

Monday, August 6, 2012

SharePoint PDF Viewer Webpart

Simply use Content Editor Web part with HTML Embed tag and point it to your PDF.

Here is the handy code -

<embed allowtransparency="true" frameborder="no" scrolling="no" src="http://<DocLibPath>/PDFFile.pdf" style="height: 900px ! important; width: 100% ! important;"></embed>

Thursday, August 2, 2012

Links

Time tools
http://www.calendarsquick.com/printables/download.html?action=customWeekly
http://www.vertex42.com/calendars/weekly-planner.html

SharePoint Shortcuts
http://www.heathersolomon.com/blog/articles/1116.aspx

Claims based Authentication
http://blog.slalom.com/2011/11/09/sharepoint-2010-fba-and-claims

Create site Provision using Sandboxed Web Template
http://sergeluca.wordpress.com/2011/05/31/deploying-site-definitions-to-a-sandbox-use-the-new-webtemplate-tag/

Word Automation Services and OpenXML- Imp Links
http://msdn.microsoft.com/en-us/library/ff742315%28v=office.14%29.aspx
http://technet.microsoft.com/en-us/library/hh202032%28d=printer,v=office.14%29.aspx
http://krunaljani.blogspot.com/2012/01/sharepoint-2010-limits-and-boundaries.html

**Tabify SharePoint Webparts**
1. http://usermanagedsolutions.com/SharePoint-User-Toolkit/Pages/Easy-Tabs-v5.aspx
2. http://kyleschaeffer.com/sharepoint/wp-tabify/

***Get Files From Document library using Silver Light Object Model***
http://www.aboutsharepoint2010.com/2012/03/29/how-to-get-files-from-document-library-silverlight-client-object-model

Working with SharePoint 2010 Projects on Visual Studio Without Installing The Server

Remotly Working and Debugging SharePoint 2010 Solutions
http://blog.raminassar.com/2011/11/23/remotly-working-and-debugging-sharepoint-2010-solutions/

 Tool to copy SharePoint List Data to SQL table - SLAM
SLAM @ Codeplex.
http://slam.codeplex.com/wikipage?title=Getting%20Started&referringTitle=Home

Technical diagrams (SharePoint Server 2010)
http://technet.microsoft.com/en-us/library/cc263199.aspx

Connect Oracle Web Services from SharePoint
http://underthehood.ironworks.com/2010/01/why-doesnt-my-generated-proxy-class-build-wsse-elements-into-the-soap-request-header.html

PDF Printer
http://www.bullzip.com/products/pdf/info.php#download

List of SP webservices
http://www.infoq.com/articles/swanson-moss-web-services

SharePoint walkthrough-
http://sharepoint.wonderfulgroup.org/public/u/SharePoint%20Server%202010/Developer%20Files/SharePoint_2010_Developer_Walkthrough_Guide.pdf

http://blog.muhimbi.com/2010/03/porting-sharepoint-2007-wspbuilder.html

http://sureshannamalai.blogspot.com/2011/06/what-does-iisreset-really-do.html

SharePoint 2010/2013-
Alternative for CAML builder-
http://biwug-web.sharepoint.com/Pages/Caml_Designer.aspx

Tools:
Directory Printer to get all the folder path
http://www.karenware.com/powertools/ptdirprn.asp

CodePlex SharePoint Tools
1 . http://deletewssfiles.codeplex.com/documentation
- Deletes documents from within different site structure
- Ex.
Usage:
DeleteFiles.exe -url
[-recursive]
[-preview]
[-contains]
[-outfile ]
[-quiet]


-url The URL to process.
-recursive Will iterate all sub sites.
-preview Will do a preview instead of delete.
-contains File name contains value. (Remark: It's not a file mask, it's a string comparison with the 'containing' method)
-outfile Will write the result to a logfile.
-quiet Will silently answer Yes to all delete questions.

2. http://tin.codeplex.com/
My Sites
- Bulk Create My Sites for All Users In Advance
- Bulk Delete All Personal Sites
- List all Current Personal Sites
User Profiles
- ToDo
Features/Solutions
- ToDo
Site and Site Collection Settings
- ToDo
and much, much more!...

3. Not codeplex but from Microsoft!!
http://www.microsoft.com/en-us/download/details.aspx?id=20022

4. Property Bag management
http://pbs2010.codeplex.com

POWERSHELL
1. Get size of content DB-
http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=193

Tuesday, July 17, 2012

Using JQuery Data Table with SharePoint Visual Web Part, SPSiteDataQuery with ContentType in Sandbox solution


1. Download Jquery Data Table files and copy following files to Layouts folder
Datatables/js/jquery.js
Datatables/js/jquery.dataTables.js
Datatables/css/demo_table.css

2. Create visual webpart. Sandbox solutions will be good here too

3. Sandbox Visual Webpart - VisualWP.ascx

<link rel="stylesheet" href="/_layouts/Datatables/css/demo_table.css" type="text/css" />
<script type="text/javascript" src="/_layouts/Datatables/js/jquery.js"></script>
<script type="text/javascript" src="/_layouts/Datatables/js/jquery.dataTables.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('#tblRepeater1').dataTable({ "oLanguage": { "sSearch": "Search the text:" },
            "iDisplayLength": 10,
            "aaSorting": [[0, "asc"]]
        });
    });
</script>
<asp:Repeater ID="rptRepeater1" runat="server">
    <HeaderTemplate>
        <table id="tblRepeater1" cellpadding="0" cellspacing="0" border="0" class="display">
            <thead>
                <tr>
                    <th>
                        Title
                    </th>
                    <th>
                        TextField1
                    </th>
                    <th>
                        TextField2
                    </th>
                    <th>
                        TextField3
                    </th>
                </tr>
            </thead>
            <tbody>
    </HeaderTemplate>
    <ItemTemplate>
        <tr>
            <td>
                <%# Eval("Title")%>
            </td>
            <td>
                <%# Eval("TextField1")%>
            </td>
            <td>
                <%# Eval("TextField2")%>
            </td>
            <td>
                <%# Eval("TextField3")%>
            </td>
        </tr>
    </ItemTemplate>
    <FooterTemplate>
        </tbody> </table>
    </FooterTemplate>
</asp:Repeater>


4. Sandbox Visual Webpart - VisualWP.ascx.cs
SPWeb spWebMain = SPContext.Current.Web;
            SPSiteDataQuery spDataQry = new SPSiteDataQuery();

            //Querying all Task Lists from the site colletion

            string striewFields = "<FieldRef Name='Title' Type='Text'/>";
            striewFields += "<FieldRef Name='TextField1' Type='Text' Nullable='TRUE' />";
            striewFields += "<FieldRef Name='TextField2' Type='Text' Nullable='TRUE' />";
            striewFields += "<FieldRef Name='TextField3' Type='Text' Nullable='TRUE' />";
            spDataQry.ViewFields = striewFields;

            SPContentType cTypeCollection = spweb.ContentTypes["MyContentType"];
            string where = string.Format(
                  @"<Where><BeginsWith><FieldRef Name='ContentTypeId'/><Value Type='Text'>{0}</Value></BeginsWith></Where>", cTypeCollection.Id);


            spDataQry.Webs = "<Webs Scope=\"Recursive\">";
            spDataQry.Query = where;

            DataTable dtTable = spWebMain.GetSiteData(spDataQry);
            rptRepeater1.DataSource = dtTable;
            rptRepeater1.DataBind();


IMPORTANT NOTE-

SPSiteDataQuery does not support Multi lookup and Multi user fields while retrieving data. Given below are list of filled NOT supported.


- LookupMulti
- UserMulti
- TaxonomyFieldTypeMulti


Please find more information here from Microsoft KB.

http://support.microsoft.com/kb/2703054



Wednesday, June 13, 2012

Sandbox Solutions - Quicklist

After a long time, but yes.. i am back again!!

Sandbox solutions dll locations-
C:\ProgramData\Microsoft\SharePoint\UCCache
Service - Microsoft SharePoint Foundation Sandboxed Code Service
Validate Sandbox Code - http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/

Friday, December 9, 2011

HOW TOs

How to Add/Change the domain for local machine.

1. Get the IP address of AD server
2. Set that IP in to Preferefered DNS server entry for the New VM/Server you are going to add on domain
3. Go to New VM/Server's properties and Change the domain name from existing WORKGROUP/Domain.



How to run queries in Oracle Using SQL*Plus

2. Please try to install maximum components you can while installation
3. Open SQL*Plus from Programs OR run SQLPLUS command from command prompt. See image below. Image given below is self describing further steps.


Friday, December 2, 2011

Connect Oracle with SharePoint/SQL using SSIS

Using the Microsoft Connector for Oracle by Attunity with SQL Server 2008 Integration Services
http://msdn.microsoft.com/en-us/library/ee470675(v=sql.100).aspx

Microsoft Connectors for Oracle and Teradata by Attunity
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=11180

Wednesday, November 16, 2011

Get Free Remote Server

http://www.cloudshare.com/

The trial period is of 15 days. However this is really good service.

Tuesday, October 11, 2011

Change Data Capture (CDC) in SQL Server 2008

http://www.mssqltips.com/sqlservertip/1474/using-change-data-capture-cdc-in-sql-server-2008/

Tuesday, October 4, 2011

SharePoint Newbies - List GUID, View GUID

To find list GUID -

- Go to “all sites content” - http://sitename/sites/webname/_layouts/viewlsts.aspx
- Click on any list (For ex. ListName) - http://sitename/sites/webname/Lists/ListName/AllItems.aspx
- Click on List Setting – As shown in Figure 1
- Page will be redirect to List Settings. Please see the URL there. You will find List GUID there – See Figure 2 and URL http://sitename/sites/webname/_layouts/listedit.aspx?List={2E9DD63B-0D31-4059-B5FE-AAA299E709F1}

To find View GUID –
- After getting List GUID in the url of setting page, just scroll down a bit on the same page. You should be able to find views section. (See Figure 3)
- Click on any of the view name you want to find GUID for. (See Figure 3)
- You will be redirect to “Edit View” page. Please check the URL on that page. It will look similar like as given below-
http://sitename/sites/webname/_layouts/ViewEdit.aspx?List=%7B2E9DD63B%2D0D31%2D4059%2DB5FE%2DAAA299E709F1%7D&View=%7B49311C81%2D0868%2D4638%2D892D%2DDE2AA53A7411%7D
- In above url, the string after text “View=” is view GUID. - %7B49311C81%2D0868%2D4638%2D892D%2DDE2AA53A7411%7D
- Here view GUID is encoded url. To decode, just replace “%7B” with “{“ ,“%7D” with “}” and replace all “%2D” with “–“).
- You will get GUID looks like- {49311C81-0868-4638-892D-DE2AA53A7411}. This is View GUID