SharePoint 2010 Template Codes

Each SharePoint site is based on one of the templates provided with the technology. The templates have specific options of SharePoint turned on or off by default. So, sometimes when you inherit a site it is nice to know which template you are using to determine what the site can and cannot do out of the box.

Note: To quickly get a list of SharePoint templates you can even use the Get-SPWebTemplate CMDLet.

Also few of the templates are marked as obsolete i.e the old Records Center template (OFFILE#0) I would suggest you to use the new template if possible when creating a Records center which is (OFFILE#1).

Check the table below for the list of Template & their respective Codes with a brief description.

Name Title Description
GLOBAL#0 Global template This template is used for initializing a new site.
STS#0 Team Site A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions.
STS#1 Blank Site A blank site for you to customize based on your requirements.
STS#2 Document Workspace A site for colleagues to work together on a document. It provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document.
MPS#0 Basic Meeting Workspace A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda, meeting attendees, and documents.
MPS#1 Blank Meeting Workspace A blank meeting site for you to customize based on your requirements.
MPS#2 Decision Meeting Workspace A site for meetings that track status or make decisions. It provides lists for creating tasks, storing documents, and recording decisions.
MPS#3 Social Meeting Workspace A site to plan social occasions. It provides lists for tracking attendees, providing directions, and storing pictures of the event.
MPS#4 Multipage Meeting Workspace A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda and meeting attendees in addition to two blank pages for you to customize based on your requirements.
CENTRALADMIN#0 Central Admin Site A site for central administration. It provides Web pages and links for application and operations management.
WIKI#0 Wiki Site A site for a community to brainstorm and share ideas. It providesWeb pages that can be quickly edited to record information and then linked together through keywords.
BLOG#0 Blog A site for a person or team to post ideas, observations, and expertise that site visitors can comment on.
SGS#0 Group Work Site This template provides a groupware solution that enables teams to create, organize, and share information quickly and easily. It includes Group Calendar, Circulation, Phone-Call Memo, the Document Library and the other basic lists.
TENANTADMIN#0 Tenant Admin Site A site for tenant administration. It provides Web pages and links for self-serve administration.
ACCSRV#0 Access Services Site Microsoft Access Server
ACCSRV#1 Assets Web Database Create an assets database to keep track of assets, including asset details and owners.
ACCSRV#3 Charitable Contributions Web Database Create a database to track information about fundraising campaigns including donations made by contributors, campaign related events, and pending tasks.
ACCSRV#4 Contacts Web Database Create a contacts database to manage information about people that your team works with, such as customers and partners.
ACCSRV#6 Issues Web Database Create an issues database to manage a set of issues or problems. You can assign, prioritize, and follow the progress of issues from start to finish.
ACCSRV#5 Projects Web Database Create a project tracking database to track multiple projects, and assign tasks to different people.
BDR#0 Document Center A site to centrally manage documents in your enterprise.
OFFILE#0 (obsolete) Records Center (obsolete) This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site also lets you manage whether records can be deleted or modified after they are added to the repository.
OFFILE#1 Records Center This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site also lets you manage whether records can be deleted or modified after they are added to the repository.
OSRV#0 Shared Services Administration Site This template creates a site for administering shared services.
PPSMASite#0 PerformancePoint A site for presenting PerformancePoint dashboards and scorecards. The site also includes links to PerformancePoint Dashboard Designer and storage for dashboard content such as analytic charts, reports, KPIs, and strategy maps.
BICenterSite#0 Business Intelligence Center A site for presenting Business Intelligence Center.
SPS#0 SharePoint Portal Server Site This template is obsolete.
SPSPERS#0 SharePoint Portal Server Personal Space This web template defines a Personal Space for an individual participating on a SharePoint Portal.
SPSMSITE#0 Personalization Site A site for delivering personalized views, data, and navigation from this site collection into My Site. It includes personalization specific Web Parts and navigation that is optimized for My Site sites.
SPSTOC#0 Contents area Template This template is obsolete.
SPSTOPIC#0 Topic area template This template is obsolete.
SPSNEWS#0 News Site This template is obsolete.
CMSPUBLISHING#0 Publishing Site A blank site for expanding your Web site and quickly publishing Web pages. Contributors can work on draft versions of pages and publish them to make them visible to readers. The site includes document and image libraries for storing Web publishing assets.
BLANKINTERNET#0 Publishing Site This template creates a site for publishing Web pages on a schedule, with workflow features enabled. By default, only Publishing subsites can be created under this site. A Document and Picture Library are included for storing Web publishing assets.
BLANKINTERNET#1 Press Releases Site This template creates the Press Releases subsite for an Internet-facing corporate presence website.
BLANKINTERNET#2 Publishing Site with Workflow A site for publishing Web pages on a schedule by using approval workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site.
SPSNHOME#0 News Site A site for publishing news articles and links to news articles. It includes a sample news page and an archive for storing older news items.
SPSSITES#0 Site Directory A site for listing and categorizing important sites in your organization. It includes different views for categorized sites, top sites, and a site map.
SPSCOMMU#0 Community area template This template is obsolete.
SPSREPORTCENTER#0 Report Center A site for creating, managing, and delivering Web pages, dashboards, and key performance indicators that communicate metrics, goals, and business intelligence information.
SPSPORTAL#0 Collaboration Portal A starter site hierarchy for an intranet divisional portal. It includes a home page, a News site, a Site Directory, a Document Center, and a Search Center with Tabs. Typically, this site has nearly as many contributors as readers and is used to host team sites.
SRCHCEN#0 Enterprise Search Center A site for delivering the search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types.
PROFILES#0 Profiles This template creates a profile site that includes page layout with zones.
BLANKINTERNETCONTAINER#0 Publishing Portal A starter site hierarchy for an Internet-facing site or a large intranet portal. This site can be customized easily with distinctive branding. It includes a home page, a sample press releases subsite, a Search Center, and a login page. Typically, this site has many more readers than contributors, and it is used to publish Web pages with approval workflows.
SPSMSITEHOST#0 My Site Host A site used for hosting personal sites (My Sites) and the public People Profile page. This template needs to be provisioned only once per User Profile Service Application, please consult the documentation for details.
ENTERWIKI#0 Enterprise Wiki A site for publishing knowledge that you capture and want to share across the enterprise. It provides an easy content editing experience in a single location for co-authoring content, discussions, and project management.
SRCHCENTERLITE#0 Basic Search Center A site for delivering the search experience. The site includes pages for search results and advanced searches.
SRCHCENTERLITE#1 Basic Search Center The Search Center template creates pages dedicated to search. The main welcome page features a simple search box in the center of the page. The template includes a search results and an advanced search page. This Search Center will not appear in navigation.
SRCHCENTERFAST#0 FAST Search Center A site for delivering the FAST search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types.
visprus#0 Visio Process Repository A site for teams to quickly view, share, and store Visio process diagrams. It provides a versioned document library for storing process diagrams, and lists for managing announcements, tasks, and review discussions.

Microsoft Access 2007-2010: Removing a Control Layout

Do you use the report wizard to help you create reports in Microsoft Access 2007? If you do, you are probably aware of the control layout. Many controls are automatically grouped into a layout when you use the wizard to create a report. These control layouts help you to arrange the controls, i.e. text boxes and labels, as a group. When you move or resize one control, the other controls will automatically adjust accordingly. While using layouts can save you time when manipulating controls, they can also be restricting. It is possible to remove a control layout. To remove a control layout, you need to view the report in the design or layout view. Once in the appropriate view, select the controls you want to remove from the layout. Then select the Arrange tab on the ribbon and click the Remove button located within the control layout section. With the control layout removed you will be able to independently move and resize the controls within your report.

SharePoint 2010 Scheduled Crawls not Running

I had this problem and the symptom was that the SharePoint Services Search Refresh timer job was in a failed state on one of the servers.  

I fixed it with the following steps:

1) Stop the Windows SharePoint Timer Service
2) Navigate to C:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config
3) Go into the single folder in there that has a GUID type name.
4) You see a whole bunch of XML files and a file cache.ini
5) Copy all the XML files to another folder somewhere (for backup), then delete them but do not delete cache.ini
6) Edit cache.ini to contain just the number "1" in the file - erase whatever is there and replace with "1"
7) Restart the Windows SharePoint Timer Service
8) You should see XML files being regenerated in the folder

Do these steps on all the front-end servers and index/query servers.  In our case on our index & query server the Windows SharePoint Timer Service was jammed in a "stopping" state so we rebooted the server and that cleared it and allowed the SharePoint Services Search Refresh timer job to succeeed. 

It also, as a bonus, finished off the deployment of a WSP solution that had got stuck in the "deploying" state when attempting to deploy.

Search Error HRESULT E_FAIL has been returned from a call to a COM component

Problem:

Recently our content source for the sharepoint sites no longer crawls and instead throws up the Error HRESULT E_FAIL has been returned from a call to a COM component

I had a look on the web and the only solution has been to change impersonation settings from false to true in the web config. Unfortunately ours was already set to true and I still have this error. Cannot get the crawl to work in sharepoint now.

Resolution:

Check the web application's website in IIS 7.

Under Authentication, make sure ASP.NET Impersonation is ENABLED. Mine was disabled and caused this error. If you have applications in SharePoint that need this disabled, you might want to extend the web application it another IIS website and Disable impersonation for users, keeping the default web application's zone enabled for search crawls on that URL.

Ensure this is set for each of the Web Applications that you wish to crawl.

Another common Crawl issue is using an AD service Account that has not been added to the SharePoint Managed Accounts.

SharePoint 2010 : Exception: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException

Initial Blog:
http://blogs.technet.com/b/sushrao/archive/2011/12/01/sharepoint-2010-exception-microsoft-sharepoint-administration-spupdatedconcurrencyexception.aspx

I just want to make sure I never lose this information!

After applying a cumulative update\ service pack on SharePoint Servers when we run psconfig.exe -cmd upgrade -inplace b2b –wait -force it fails on step 3 with the error message

"Exception: Microsoft.SharePoint.Administration.SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action. The object SPUpgradeSession Name=Upgrade-20110604-023550-824 was updated by Topgear\administrator, in the PSCONFIG (4272) process, on machine SharePoint2010. View the tracing log for more information about the conflict"

Resolution:

Open command prompt on the SharePoint Server (Run as Administrator)

Navigate to following location

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin

Execute:

stsadm -o setproperty -pn command-line-upgrade-running -pv Yes

Note: Running the above command on the SharePoint server will reset the command-line-upgrade-running property where an upgrade process stopped responding. Also, this command needs to be executed on each SharePoint Servers in the farm after the upgrade completes successfully on first server

Later, execute following to initiate the upgrade process again.

psconfig.exe -cmd upgrade -inplace b2b –wait –force

Note: If the upgrade fails with any errors re-view the upgrade.log file as it would contain detailed information to troubleshoot.

SSRS Report site Security

The SSRS Reports website security can sometimes be troublesome when first configured and trying to connect to it from a remote machine. The RSReportServer.config file has a AuthenticationType section that required attention if you are prompted for authentication when accessing the site remotely. By default you may get all 3 types, however if you are just using regular Windows authentication you should only have RSWindowsNTLM in the list. Removing the other 2 will allow you into the site, provided you have access to the database.

 

      <AuthenticationTypes>
             <RSWindowsNegotiate />
             <RSWindowsKerberos />
             <RSWindowsNTLM />
      </AuthenticationTypes>

How to find a Field in a SQL Database

Replace Diameter with your own search.

SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%Diameter%'
ORDER BY schema_name, table_name;

List ALL fields in a Database

SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID 
ORDER BY schema_name, table_name;


Hope this helps.

JavaScript Date Object

JavaScript Date Object

Describes the JavaScript Date Object including properties, constructors, and methods.

Properties

  • prototype - For creating more properties.

Constructors

  • Date() - Use the current date and time to create an instance of the object date.
  • Date(dateString) - Use the date specified by the string to create the instance of the date object. String format is "month day, year hours:minutes:seconds".
  • Date(year, month, day) - Create an instance of date with the specified values. Year is 0 to 99.
  • Date(year, month, day, hours, minutes, seconds) - Create an instance of date with the specified values.

Methods

  • getDate() - Get the day of the month. It is returned as a value between 1 and 31.
    var curdate = new Date()
    var mday = curdate.getDate()
    document.write(mday + "<BR>")
    

    The above code prints the day of the month.

  • getDay() - Get the day of the week as a value from 0 to 6
    var curdate = new Date()
    var wday = curdate.getDate()
    document.write(wday + "<BR>")
    

    The above code prints the day of the week.

  • getHours() - The value returned is 0 through 23.
    var curdate = new Date()
    var hours = curdate.getHours()
    document.write(hours + "<BR>")
    

    The above code prints the hours since midnight.

  • getMinutes() - The value returned is 0 through 59.
    var curdate = new Date()
    var minutes = curdate.getMinutes()
    document.write(minutes + "<BR>")
    

    The above code prints the minutes past the hour.

  • getMonth() - Returns the month from the date object as a value from 0 through 11.
    var curdate = new Date()
    var month = curdate.getMonth()
    document.write(month + "<BR>")
    

    The above code prints the numeric value of the month.

  • getSeconds() - The value returned is 0 through 59.
    var curdate = new Date()
    var seconds = curdate.getSeconds()
    document.write(seconds + "<BR>")
    

    The above code prints the seconds since the last minute.

  • getTime() - The number of milliseconds since January 1, 1970. this function allows you to manipulate the date object based on a millisecond value then convert it back to the form you want. In the example below, it is used to set a future expiration time of a cookie.
    var futdate = new Date()
    var expdate = futdate.getTime()
    expdate += 3600*1000 //expires in 1 hour(milliseconds) 
    futdate.setTime(expdate)
    
  • getTimeZoneOffset() - Time zone offset in hours which is the difference between GMT and local time.
    var curdate = new Date()
    var offset = curdate.getTimeZoneOffset()
    document.write(offset + "<BR>")
    

    The above code prints the number of hours different between your timezone and GMT. This value may change with daylight savings time..

  • getYear() - Returns the numeric four digit value of the year.
    var curdate = new Date()
    var year = curdate.getYear()
    document.write(year + "<BR>")
    

    The above code prints the numeric value of the year which is currently 2000.

  • parse() - The number of milliseconds after midnight January 1, 1970 till the given date espressed as a string in the example which is IETF format.
    var curdate = "Wed, 18 Oct 2000 13:00:00 EST"
    var dt = Date.parse(curdate)
    document.write(dt + "<BR>")
    
  • setDate(value) - Set the day of the month in the date object as a value from 1 to 31.
  • setHours(value) - Set the hours in the date object with a value of 0 through 59.
  • setMinutes(value) - Set the minutes in the date object with a value of 0 through 59.
  • setMonth(value) - Set the month in the date object as a value of 0 through 11.
  • setSeconds(value) - Set the seconds in the date object with a value of 0 through 59.
  • setTime(value) - Sets time on the basis of number of milliseconds since January 1, 1970. The below example sets the date object to one hour in the future.
    var futdate = new Date()
    var expdate = futdate.getTime()
    expdate += 3600*1000 //expires in 1 hour(milliseconds) 
    futdate.setTime(expdate)
    
  • setYear(value) - Set the year in the date instance as a 4 digit numeric value.
  • toGMTString() - Convert date to GMT format in a form similar to "Fri, 29 Sep 2000 06:23:54 GMT".
    var curdate = new Date()
    dstring = curdate.toGMTString()
    document.write(dstring + "<BR>" + curdate.toLocaleString() + "<BR>")
    

    The above example produces:

    Wed, 18 Oct 2000 18:08:11 UTC
    10/18/2000 14:08:11
    
  • toLocaleString() - Convert date to local time zone format. See the example, above.
  • UTC() - Based on a comma delimited string, the number of milliseconds after midnight January 1, 1970 GMT is returned. The syntax of the string is "year, month, day [, hrs] [, min] [, sec]". An example is "2000, 9, 29, 5, 43, 0" for Sept 29, 2000 at 5:43:0. The string is considered to be GMT. The hours, minutes, and seconds are optional.
    document.write(Date.UTC(2000, 9, 29, 5, 43, 0) + "
    ")

    The above example produces:

    972798180000
    

VS2010 and IE10 Attaching the Script debugger to process iexplore.exe failed

If you have installed IE10 and you are running Visual Studio 2010, you may get this annoying pop-up.
"Attached the Script debugger to process '[1111] iexplore.exe' on machine 'MINE' failed. A debugger is already attached."
There is a simpler fix for the JavaScript debugging issue in IE10:
  1. Close IE
  2. In elevated cmd prompt run this command:

regsvr32.exe "%ProgramFiles(x86)%\Common Files\Microsoft Shared\VS7Debug\msdbg2.dll

or %ProogramFiles% on a 32-bit OS.

Hope this helps!

Cannot deactivate site template (solution) after creating and deleting a new site

Problem: In SharePoint 2010, I created a new site template from an existing site and a new site using this template. After deleting the new site and I cannot deactivate the site template to be able to remove it. Here's the exception I get:
System.ArgumentException: Value does not fall within the expected range. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Stack Trace: [ArgumentException: Value does not fall within the expected range.] Microsoft.SharePoint.SPWebCollection.get_Item(Guid id) +27763375 Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId) +252 [SPFeatureIsOrphanedException: Unable to access web scoped feature (Id: 5c143ca0-e513-4fa5-93a6-a926352c982e) because it references a non-existent or broken web (Id: 196cdf6e-d4a1-4cb6-b962-591aaa3c5f43) on site 'http://win-9o8m2cks1v7'. Exception: System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
Solution: Go to the Site Settings page for the root web of your site collection. Under the heading Site Collection Administration, click the Recycle bin link. On the QuickLaunch menu, select End User Recycle Bin items, then select all the items that appear and click the Delete Selection link at the top of the items list. Now select Deleted From End User Recycle Bin from the QuickLaunch Menu and do the same.
Now return to the solution gallery and you should be able to deactivate and delete your solution.