Search This Blog

Tuesday, March 31, 2015

Sukanya Samriddhi Account Calculator Sheet

Yearly lump sum Investment– 1.5 Lac (Starting of year)
Rate of Interest – 9.2%
Note: Government of India announced ROI 9.2% for 2015-16 Financial Year
Investment Period – 14 years
Maturity Amount – 80 Lac
Assumption: – Sukanya Samriddhi Account is opened on birth of girl child. Age -1 Year.

View Calculations from below link.

Monday, March 30, 2015

New SharePoint 2016 Update Model



SP 2016 Preview would be out soon, Pl go through the below article for SP 2016 improvements for SharePoint Administrators and New SharePoint 2016 Update Model

Thursday, March 26, 2015

SharePoint 2010 14 hive Template Directory



SharePoint 2010 14 hive Template Directory
TEMPLATE folder is one of the very most important folder in SharePoint, Template folder resides templates, pages, masterpages etc... We will check the breakdown structure of directory and what each folder is meant for in SharePoint. Understanding this folder structure is important to get clear picture on, how and where SharePoint will house our deployed items.
TEMPLATE Directory
TEMPLATE directory path
[root directory]:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE
SharePoint 2010 TEMPLATE directory image as below

1033
This sub-directory contains templates for various documents, XML files, and workflows.
This number corresponds to the language localization for English.
If SharePoint is installed with other languages being primary, the number will be different.
Refer 
http://technet.microsoft.com/en-us/library/ff463597.aspx for other language pack numbers
Admin
The ADMIN sub-directory contains ASP.NET server pages that correspond to administrative
tasks. Most of them will be accessed through the Central Administration site.
CONTROLTEMPLATES
This is one of the common sub-directory used by many. This contains ASP.NET user controls that are utilized by SharePoint. Also while SharePoint customization, folders will be deployed to house the project related files.
For example: If we create any visual web parts the user controls will be deployed as folders in this sub-directory.
DocumentTemplates
The only thing stored in this directory is the standard ASP.NET server page for wikis.
FEATURES
The FEATURES sub-directory contains 250+ folders, which represent the core features of SharePoint 2010. Each of these folders contain a Feature.xml file, which identifies to SharePoint 2010 several characteristics such as the identity, scope, resources and manifest location of the feature. SharePoint customization deployed as features will be deployed to this sub-directory.
GLOBAL
This sub-directory houses the standard ASP.NET master pages that deploy with SharePoint
2010, such as the v4, default, and minimal master pages. Also here are global templates for site definitions, views, and schema for list templates.
IDENTITYMODEL
This sub-directory contains default login pages for the different types of authentication
models, such as Forms, Windows, Trust, Login and Card.
IMAGES
This sub-directory houses all of the standard images for the SharePoint product.
If you have images deployed as part of customized solutions, by default they will
be deployed as sub-folders of this sub-directory.
LAYOUTS
The LAYOUTS folder is the folder that contains a large portion of the ASP.NET server
pages that are used in the SharePoint product.
You can reference this directory from within a SharePoint site by using a format similar to the following: http://mysite/_layouts/viewlsts.aspx
Pages
Only three ASP.NET server pages are stored in this folder, named form, viewpage,
and webfldr.
Scenarios
This sub-directory contains wizard-style pages, used in some of the different services
with greater complexity, such as BCS, Profile Service Application, and joining the
farm with a particular web server.
Site Templates
This sub-directory contains the site templates for the different built-in SharePoint
2010 web templates.
SQL
This sub-directory contains SQL table creation scripts for tables associated with
various types of SharePoint 2010 databases. Many of the services database creation
scripts are here, such as the UsageDB, the Diagnostics DB, and Configuration DBs.
Also stored here are upgrade scripts to upgrade from a SharePoint 2007 solution
to a SharePoint 2010 solution.
THEMES
This sub-directory houses the 23 built-in themes or looks that are installed with
SharePoint 2010.
XML
The XML sub-directory contains XML schema and document files related to various
configurations in SharePoint.
Conclusion
Hope this post gave good information on SharePoint 2010 file system TEMPLATE Folder.

Add Fields To SharePoint List with PowerShell in SharePoint 2010 (Part2)



This blog includes how to create lookup fields, checkbox field, person or group field and hyperlink field. With this coverage the most common and frequent tasks related to SharePoint 2010 list with PowerShell will be now easier.
 Adding lookup field
$errorlabel=$falsetry
 {
 $TestSiteUrl = "http://XXXXXXXX:XXXX/sites/XXXX"
 $NewWebobj = Get-SPWeb -identity $TestSiteUrl
 $newListName = "ProductList"
 $newListDescription = "Product Information"
 $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::GenericList
 $lstId = $NewWebobj.Lists.Add($ListName,$ListDescription,$ListTemplateType)
 write-host "list " $newListName " created successfully" $newListName -ForegroundColor Green
 $listUrl = $NewWebobj.ServerRelativeUrl + "/lists/" + $newListName;
 $myCustomList = $NewWebobj.GetList($listUrl)#get the lookup list ID
 $lookupListName = "MyLookupList"
 $LookulistUrl = $NewWebobj.ServerRelativeUrl + "/lists/" + $lookupListName;
 $lookupListObj = $NewWebobj.GetList($LookulistUrl)
 $lookupListId = $lookupListObj.ID#adding column of type 'lookup'

$fieldXml = "<Field Type='Lookup' DisplayName='LookupCol1' List='{" + $lookupListId + "}' ShowField='Title'
RelationshipDeleteBehavior='None' Name='LookupCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$fieldXml2 = "<Field Type='Lookup' DisplayName='LookupCol2' List='{" + $lookupListId + "}' ShowField='Title'
               Indexed='True' RelationshipDeleteBehavior='Restrict' Name='LookupCol2'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml2,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$fieldXml3 = "<Field Type='Lookup' DisplayName='LookupCol3' List='{" + $lookupListId + "}' ShowField='Title'
Indexed='True' RelationshipDeleteBehavior='Cascade' Name='LookupCol3'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml3,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$myCustomList.Update()
 }
 catch
 {

write-host "Error" $_.exception
 $errorlabel = $true
 }
 finally
 {
 if($NewWebobj -ne $null) {$myTestWeb.Dispose()}

if($errorlabel -eq $true){exit 1}
 else {exit 0}
 }

exit 0

Above code creates a custom list with three types of lookup columns.
Need to Considering only the snippet from the above code
$fieldXml = "<Field Type='Lookup' DisplayName='LookupCol1' List='{" + $lookupListId + "}' ShowField='Title'
RelationshipDeleteBehavior='None' Name='LookupCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$lookupListId is the ID of the list to which the lookup column belongs to
RelationshipDeleteBehavior=’None’ states that if the column in the actual list is deleted; then all other lists which are referring that column will be orphaned. So,the data will be there in other lists that referred this column, but no more relation.
In other lookup fieldxmls, we have used RelationshipDeleteBehavior with ‘Restrict‘ and ‘Cascade
RelationshipDeleteBehavior=’Restrict’ states that if we try to delete the column in the actual list; then SharePoint will restrict to delete unless all the data with lookup references are removed first.
RelationshipDeleteBehavior=’Cascade’ states that if we try to delete the column in the actual list; then SharePoint will delete all the referenced data where ever this column is used as lookup column.
It will give us warning if we want to continue the delete the operation or not
We have another way of creating lookup column. Infact I prefer creating columns with xml string, because it gives overview of complete properties what the list has.
$myCustomList.Fields.AddLookup("Title",$lookupListId,$false)
#set all other properties like we do in c#

Adding field of type ‘Checkbox’

Creating field of type ‘Checkbox’
$fldXml = "<Field Type='Boolean' DisplayName='chkBoxCol1' Name='chkBoxCol1'>
           <Default>1</Default>
           </Field>"
$myCustomList.Fields.AddFieldAsXml($fldXml,$true,Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)
The above code will create checkbox field in the list with default values as checked.
1 this makes checkbox checked by default
0 this makes checkbox unchecked by default

Adding field of type ‘People or Group column’

$fldXml = "<Field Type='User' DisplayName='PersonCol1' List='UserInfo' ShowField='ImnName'
UserSelectionMode='PeopleOnly' UserSelectionScope='0' Name='PersonCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fldXml,$true,Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

The above code will create people and group column ‘PersonCol1′ which allows only user(people) values but not user group names.
Setting UserSelectionMode=’PeopleAndGroups’ will allow user group values.
There are other possible values which can be set for ShowField attribute -
Title, NameWithPicture, NameWithPictureAndDetails, ImnName (this is NameWithPresence)

Adding field of type ‘Hyperlink’

$fldXml = "<Field Type='URL' DisplayName='HyperlinkCol1' Format='Hyperlink' Name='HyperlinkCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fldXml,$true,Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

The above code will create Hyperlink column ‘HperlinkCol1′.
The property Format can have other value ‘Image
Reference:
http://adicodes.com/adding-fields-to-list-with-powershell-in-sharepoint-2010-part2/