SP 2013 Learnings Important links



1. How to Configure Email Enabled Document Libraries in SharePoint 2013 
     Video -  https://www.youtube.com/watch?v=FpFSsQUzi7M

2.How to configure the site access requests in Sharepoint 2013
    Article -  http://blog.cloudshare.com/2012/12/09/how-to-configure-the-site-access-request-in-sharepoint-2013/

3.Good video for share point development 2010
http://www.youtube.com/watch?v=7c-6GrWuwbQ

4.2013 info path form.
https://www.youtube.com/watch?v=YykPToPH0Cc
5.http://www.youtube.com/watch?v=sFiPtoGpjFI
SharePoint 2010 | Cascading Lookup Field using Client Object Model

5.   client object model sample code : pagination, add, update,delete

http://msdn.microsoft.com/en-us/library/office/ee857094%28v=office.14%29.aspx


6.http://www.learningsharepoint.com/2010/07/27/programatically-create-user-groups-client-object-model-sharepoint-2010/

7.https://www.facebook.com/learning.sharepoint.page   - good tips


work at home:
8.http://www.oclktrk.com/f.php?btid=024-SPU-1049789-441-BTIDP95ennPPBzY_&u=http%3A%2F%2Fovaed.com%2Fclick%3Foffer%3D368%26aff%3D41%26subid%3DBamboosolutions.com%26subid2%3D024-SPU-1049789-441-BTIDP95ennPPBzY_&p=Greener Web


Please read the user feedback.

How to update table which is having trigger..

 alter table CampaignBuyer disable trigger
begin tran
update CampaignBuyer
set b.user_id = c.user_id
-- select b.user_id,c.user_id,b.*
from CampaignBuyer b,  #test c
where
b.market_code = c.market_code
and b.campaign_id = c.campaign_id
and b.notes = c.notes
and b.buy_due_date = c.buy_due_date
and b.assigned_date = c.assigned_date
and b.station_replicate_flag = c.station_replicate_flag
and b.buyer_type = c.buyer_type
commit tran
rollback tran
alter table CampaignBuyer enable trigger

----

SharePoint online migration from SharePoint 2013/2016 pre-analysis

Migrating SharePoint 2013 to office 365 share point online following steps need to be taken care.

1. Take your existing site inventory first.
2.Check the orphan sites and unused site.
3. Try to remove all the content those are all no longer needed.
4. Check your current office 365 account plan.
5. Make sure your custom code get replaced with new office 365 compatible code.(we can't deploy wsp)
6. Plan for new template and related css to retain the same look and feel
7. Third party workflow online version and usage policy. They may charge for per workflow and etc.
8.Go with migration tool.
9. Checkout and major version file only will be migrated.
10. Purge all the running instance or ask users to complete the workflow tasks.

11.Try one sample run. and test .
Thanks

sharepoint 2010 code sample Links

http://www.sharepoint-tips.com/2006/08/common-and-simple-coding-tasks-in.html

using(SPSite mySite = new SPSite("http://server/sites/site"))
{
   using(SPWeb myWeb = mySite.OpenWeb())
   {
      string linksHtml = "";
      foreach(SPList list in myWeb.Lists)
      {          
         string listLink = "<a href='" + list.DefaultView.Url.ToString()          + "'>" + list.Title + "</a>(<b>"+list.Items.Count+"</b>)<br>";
         linksHtml += listLink;
      }
   }
}

--
using(SPSite mySite = new SPSite("http://server/sites/site"))
{
   using(SPWeb myWeb = mySite.OpenWeb())
   {
   }
}
--
using(SPSite mySite = new SPSite("http://server/sites/site"))
{
   using(SPWeb myWeb = mySite.OpenWeb())
   {
      string linksHtml = "";
      foreach(SPList list in myWeb.Lists)
      {          
         string listLink = "<a href='" + list.DefaultView.Url.ToString()          + "'>" + list.Title + "</a>(<b>"+list.Items.Count+"</b>)<br>";
         linksHtml += listLink;
      }
   }
}
------


---------------
http://sharepoint-coding.blogspot.com/

Sharepoint Large List pagination Implementation



SPWeb oWebsite = SPContext.Current.Web;
SPList oList = oWebsite.Lists["Announcements"];

SPQuery oQuery = new SPQuery();
oQuery.RowLimit = 10;
int intIndex = 1;

do
{
    Response.Write("<BR>Page: " + intIndex + "<BR>");
    SPListItemCollection collListItems = oList.GetItems(oQuery);

    foreach (SPListItem oListItem in collListItems)
    {
        Response.Write(SPEncode.HtmlEncode(oListItem["Title"].ToString()) +"<BR>");
    }

    oQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition;
    intIndex++;
} while (oQuery.ListItemCollectionPosition != null);

------------------------------------------------------------------------
 
Retrieving Items with SPList.GetItems
 
SPQuery query = new SPQuery();
SPListItemCollection spListItems ;
string lastItemIdOnPage = null; // Page position.
int itemCount = 2000

while (itemCount == 2000)
{
    // Include only the fields you will use.
    query.ViewFields = "<FieldRef Name=\"ID\"/><FieldRef Name=\"ContentTypeId\"/>";  
    query.RowLimit = 2000; // Only select the top 2000.
    // Include items in subfolder (if necessary).
    query.ViewAttributes = "Scope=\"Recursive\"";
    StringBuilder sb = new StringBuilder();
    // To make it order by ID and stop scanning the table, specify the OrderBy override attribute.
    sb.Append("<OrderBy Override=\"TRUE\"><FieldRef Name=\"ID\"/></OrderBy>");
    //.. Append more text as necessary ..
    query.Query = sb.ToString();
    // Get 2,000 more items.

    SPListItemCollectionPosition pos = new SPListItemCollectionPosition(lastItemIdOnPage);
    query.ListItemCollectionPosition = pos; //page info
    spListItems = spList.GetItems(query);
    lastItemIdOnPage = spListItems.ListItemCollectionPosition.PagingInfo;
    // Code to enumerate the spListItems.
    // If itemCount <2000, we finish the enumeration.
    itemCount = spListItems.Count;

}
---------------------------------------------------------
 
Cache items
 
private static object _lock =  new object();

public void CacheData()
{
   SPListItemCollection oListItems;
       oListItems = (SPListItemCollection)Cache["ListItemCacheName"];
      if(oListItems == null)
      {
         lock (_lock)
         {
              //Ensure that the data was not loaded by a concurrent thread while waiting for lock.
              oListItems = (SPListItemCollection)Cache[“ListItemCacheName”];
              if (oListItems == null)
              {
                   oListItems = DoQueryToReturnItems();
                   Cache.Add("ListItemCacheName", oListItems, ..);
              }
         }
     }
}
---------------------
private static object _lock =  new object();

public void CacheData()
{
   DataTable oDataTable;
   SPListItemCollection oListItems;
   lock(_lock)
   {
           oDataTable = (DataTable)Cache["ListItemCacheName"];
           if(oDataTable == null)
           {
              oListItems = DoQueryToReturnItems();
              oDataTable = oListItems.GetDataTable();
              Cache.Add("ListItemCacheName", oDataTable, ..);
           }
   }
}

SharePoint 2010 - Terminology

SharePoint 2010 - Terminology This article provides definitions for common terms relating to SharePoint 2010.
Content type - A collection of Site Columns grouped together to define an item that you would like to store.
Farm - Installation of one or more load-balanced Web servers, and back-end servers, with a configuration database.
Farm Feature - Feature that is scoped globally for the entire server farm. For this reason, farm Features are also known as "global Features." Unlike other Feature types, a global Feature is activated by default in the farm. A farm Feature contains several elements that are critical for implementing applications and logic.

Feature - A package of Windows SharePoint Services elements that helps a user accomplish a particular goal or task. For example, one Feature might be named "My Favorite Items" and contain the following:

A custom list that stores, per user, a list of the user's favorite items. This list is created as a single hidden list per workspace when a Feature is enabled.

A custom menu item, named "Add to Favorites", that is attached to all lists and adds an item to the Favorites list.

A Web Part that shows the user the top 10 favorites, with usage and link tracking to bring true favorites to the top.

Each of these individual elements, by themselves, may not be useful, but when you enable all of them on a site they become a complete Feature that solves a particular task.

Library – Container for holding documents, pictures, lists, discussions.

List - Container in which SharePoint stores data. Much of SharePoint is stored in a list.

Page - Container for Web Part zones, and Web Parts.

Site - Container for child sites, pages, and content such as lists and document libraries.

Site Collection - Container for SharePoint sites, which exists within a specific content database. A site collection contains a top-level site and optional child sites, and is the unit of ownership, securability, and recoverability.


Site Collection Feature - Feature that is scoped at the site collection level. Typically, a site collection Feature contains items that apply to the site collection as a whole, such as Web Parts or content types that are global to the site collection.

Site Definition - A grouping of lists, features, settings, style sheets, themes master pages and a bunch of other stuff that define a web site. An example of a site definition would be Team Site, Publishing Site with Workflow, or Blank Site. You need to choose a site definition when you create a new Site Collection or a new Site.


Site Template - A customized Site Definition. Site Templates are usually used to save small changes done to a Site Definition so that they can be reused over and over again.


Web Application - IIS Web site, extended to use SharePoint, which can host site collections.

Web Application Feature - A Feature that is scoped to the Web application level.

Web Part - Components that display content on a page and are the primary means for users to customize/personalize pages.

Web Part Zone - Container for Web Parts.

SPFX - HTTPClient - Curd Operations - SharePoint list.

  Create solution in the name of SpfxCrud. ISpfxCrudProps.ts export interface ISpfxCrudProps {   description : string ;     context : an...