March 31, 2011

Hide "SAVE" button from SharePoint survey

This is another requirement came from user:
His intesion is to hide "SAVE" button from the survey, when it is having link from one question to another.
here the problem is if a survey contails sutch linking pages from question to question, it show "NEXT" "SAVE" "CANCEL" buttos. if user clicks "SAVE" buttot at first question itself the survey end's and the survey comes under incompleted list. which is not expecting the functionality; so by using jquery we can hide the "SAVE" button.

1) Firstofall go to your survey page by clicking "Respond to Survey".
now in the URL after NewForm.aspx add ?PageView=Shared&ToolPaneView=2
like: http://xxxxxxx/xxxxx/NewForm.aspx?PageView=Shared&ToolPaneView=2  , now it will convert the page into edit mode.

2)Now add a content editor web part and copy the below two sections of the scripts in to content editor web part and exit from edit mode, and see the magic :) "SAVE" button will be hidden.
==================================================
//section 1
<script type="text/javascript">
 if(typeof jQuery=='undefined'){
  var jQPath = 'http://ajax.googleapis.com/ajax/libs/jquery/1.3/';
  document.write('<script src="',jQPath,'jquery.min.js" type="text/javascript"><\/script>');
 }
</script>

//section 2
<script type="text/javascript">
$(function() {
 $(":inputs[value='Save']").hide();
  });
</script>
==================================================
so what section 1 will do?
first it will check whether the jquery library included in page or not [it is very important to include jquery library as we are using jquery to hide the button]

what section 2 will do?
it will find Save button and hide it.

thats it...... :)

How to Move a SharePoint site from one site collection to another

Here we got a requirement like moving a site collection from one division to another; the simple way to do is STSADM.EXE.
And steps are as follows:
Move Top Level Site to Sub Site
First, I had a top level site in it's own web application that needed to be a sub-site in another web application.  I've illustrated in the graphic below.  We had to move Site 1 from Site Collection 1 to Site Collection 2.


To export I used:
  • stsadm.exe -o export -url http://Site1 -filename Site1.cab -versions 4
To import I used:
  • stsadm.exe -o import -url http://SiteA/Site1 -filename Site1.cab
Notes
  1. If http://SiteA/Site1 already exists when you do you import you may see an error telling you the templates don't match.  This means the export site was created using a different template to the one that exists in the new location.  To workaround this back up and delete http://SiteA/Site1 then run the import again.
  2. Any content that hasn't been approved will not be exported by default.  I used the -versions 4 switch to export all major, minor and draft versions.  You might not need to do this.
Move Sub Site to Top Level Site
Next I needed to move a sub site in Site Collection 1 and move it into an empty Web Application 2.  In the figure below we had to move Site C from Site Collection 1 to Site Collection 2.

For the export I used:
  • stsadm -o export -url http://SiteA/SiteC -filename SiteC.cab -versions 4
Because there was no site collection I created one with STSAdm without choosing a template.  Like this:
  • stsadm.exe -o createsite -url http://SiteC -ownerlogin domain\administrator -owneremail administrator@domain.com -title Site C
That way you don't get any template clashes when you do your import:
  • stsadm.exe -o import -url http://SiteC -filename SiteC.cab
Notes
  1. An export should take all content with it.
  2. Custom features that have been installed on the source server will need to be packaged up and installed on the target before the import will work.
  3. It does matter which account you use for the export.  Strangely, if you don't have the right access the command runs successfully but the export file has got nothing in it.  The import doesn't fail either, but you can't find the site you thought you exported.   I've tried with an account that had local admin rights and was a site collection admin, but that isn't enough.  Always use the farm account.

Step by Step SharePoint 2010 Install RTM - as like Prod Env

I Found this valuable post from the blog "ACS Blogs" [i hope it will help]

==========================================================
DOMAIN CONTROLLER – CONTOSO-DC
  1. Start Hyper-V Manager on a 64bit server
  2. Click “Action->New->Virtual Machine”
  3. For Name, type “503xx-Contoso”
  4. Click “Next”
  5. For memory, type “512”
  6. Click “Next”
  7. Select a local connection, click “Next”
  8. Select a location, ensure that the size is set to at least 127GB
  9. Click “Next”
  10. Click “Next”
  11. Click “Finish”
  12. Right click the virtual machine in Hyper-V, select “Settings”
  13. Set the number of processors to “2”
  14. For the IDE Controller 1, specify the “Windows Server 2008 R2” iso
    1. Click “Browse”
    2. Select the iso
    3. Click “Open”
  15. Click “Ok”
  16. Start the Virtual Machine
  17. Install Windows Server 2008 R2
    1. Click “Next”
    2. Click “Install Now”
    3. Select “Windows Server 2008 R2 Enterprise (Full Installation)”
    4. Click “Next”
    5. Click “I accept the license terms”
    6. Click “Next”
    7. Click “Custom (advanced”)
    8. Click “Next”, windows will install
    9. Click “Ok”
    10. For password, type “Pa$$w0rd”
    11. Type “Enter”
    12. Click “Ok”
  18. Set the IP settings
    1. IP 10.0.0.11
    2. Subnet 255.0.0.0
    3. Gateway 10.0.0.1
    4. DNS 10.0.0.11
  19. Click “Start”
  20. Right click “Computer”, select “Properties”
  21. Under computer name, click “Change settings”
  22. For description, type “contoso-dc”
  23. Click “Change”
  24. Set the computer name to “Contoso-dc”
  25. Click “Ok”
  26. Click “Yes” to restart
  27. Logon as administrator with password Pa$$w0rd
  28. Open a command prompt, run dcpromo, setup a domain called “contoso.com”
    1. Click “Next”
    2. Click “Next”
    3. Select “Create a new domain…”
    4. Click “Next”
    5. Enter contoso.com, click “Next”
    6. Select “Windows Server 2008”, click “Next”
    7. Click “Next”
    8. Click “Yes, the computer will use…”
    9. Click “Yes”
    10. Click “Next”
    11. For password, type “Pa$$w0rd”
    12. Click “Next”
    13. Click “Next”, active directory will set itself up
    14. Click “Finish”, click “Restart Now”
  29. Login as Contoso\administrator with password “Pa$$w0rd”
  30. Create the following domain users, set their password to “Pa$$w0rd” and that the password doesn’t expire.  NOTE: you can download the setup script from http://instructor.architectingconnectedsystems.com
    1. Click “Start->Administrative Tools->Active Directory Users and Computers”
    2. Expand contoso.com
    3. Select “Users”, right click and select “New->User”
    4. For name and user logon, type sp_admin
    5. Click “Next”
    6. For Password, type “Pa$$w0rd”
    7. Uncheck “User must change…”
    8. Check “Password never expires”
    9. Click “Next”
    10. Click “Finish”
    11. Repeat for
                                                              i.      sp_farm
                                                            ii.      sp_service
                                                          iii.      student
                                                          iv.      Sp_user
                                                            v.      Sp_viewer
                                                          vi.      Sp_design
                                                        vii.      Sp_custom
                                                      viii.      Sp_member
                                                          ix.      Sp_visitor
                                                            x.      Sp_owner
                                                          xi.      Sp_colleague

SP2010-WFE1

  1. Start Hyper-V Manager on a 64bit server
  2. Click “Action->New->Virtual Machine”
  3. For Name, type “50351-SharePoint (Dev)”
  4. Click “Next”
  5. For memory, type “6144”
  6. Click “Next”
  7. Select a local connection, click “Next”
  8. Select a location, ensure that the size is set to at least 127GB
  9. Click “Next”
  10. Click “Next”
  11. Click “Finish”
  12. Right click the virtual machine in Hyper-V, select “Settings”
  13. Set the number of processors to “2”
  14. For the IDE Controller 1, specify the “Windows Server 2008 R2” iso
    1. Click “Browse”
    2. Select the iso
    3. Click “Open”
  15. Click “Ok”
  16. Start the Virtual Machine
  17. Install Windows Server 2008 R2
    1. Click “Next”
    2. Click “Install Now”
    3. Select “Windows Server 2008 R2 Enterprise (Full Installation)”
    4. Click “Next”
    5. Click “I accept the license terms”
    6. Click “Next”
    7. Click “Custom (advanced”)
    8. Click “Next”, windows will install
    9. Click “Ok”
    10. For password, type “Pa$$w0rd”
    11. Type “Enter”
    12. Click “Ok”
  18. In the “Server Manager” window that opens:
    1. Click “Configure Remote Desktop”
    2. Click “Allow connections from computers running any version…”
    3. Click “OK”
    4. Click “OK”
    5. Click “Configure IE ESC”
    6. Click “Off” for both administrators and users
    7. Click “OK”
    8. Click “Go to Windows Firewall”
    9. Click “Windows Firewall properties”
    10. For domain, private, public, set the firewall status to “Off”
    11. Click “OK”
    12. Click “Features”
    13. Click “Add Features”, select the following, if prompted click “Add Required Features”:
                                                              i.      Desktop experience
                                                            ii.      Remote Server Administration Tools->Role Administration Tools
1.      AD DS and AD LDS Tools
2.      DNS Server Tools
3.      File Services Tools
                                                          iii.      SMTP server
    1. Click “Next”
    2. Click “Next”
    3. Click “Next”
    4. Click “Install”
    5. Click “Close”
    6. Click “Yes”, the computer will restart
  1. Login as administration with password Pa$$w0rd
  2. Click “Close” in the configuration wizard
  3. Check the “Do not show me this console at logon” checkbox, close the server manager
  4. On Network settings, set the network settings as follows:
    1. IP to 10.0.0.21
    2. Subnet 255.255.255.0
    3. Gateway 10.0.0.1
    4. DNS 10.0.0.11
  5. Click “Start”
  6. Right click “Computer”, select “Properties”
  7. Under computer name, click “Change settings”
  8. For description, type “sp2010-wfe1”
  9. Click “Change”
  10. Set the computer name to “sp2010-wfe1”
  11. Click “Domain”, set the domain to “Contoso.com”
  12. Click “Ok”, use Contoso\administrator with password Pa$$w0rd, click “OK”
  13. Restart the virtual machine
  14. Login as CONTOSO\Administrator
  15. Add SP_Farm and SP_Admin to the local administrators group
    1. Open Server Manager
    2. Expand Configuration->Local Users and groups->Groups
    3. Double click “Administrators”
    4. Add the accounts
  16. Install SQL Server 2008 R2
    1. Insert the Server 2008 R2 iso
    2. Run the setup.exe file
                                                              i.      If prompted, click “OK” to install .NET
    1. Click “Installation”
    2. Click “New installation or add features to an existing installation”
    3. On “Setup Support Roles”, click “Ok”
    4. On “Setup Support Files”, click “Install”
    5. Click “Next”
    6. On product key, enter your key and then click “Next”
    7. Click “I accept the license terms”
    8. Click “Next”
    9. On the Setup Support Files, click “Install”
    10. Click “Next”
    11. On “Setup Role”, click “Next”
    12. Check the following:
                                                              i.      Database Engine
                                                            ii.      Analysis Services
                                                          iii.      Reporting Services
                                                          iv.      Business Intelligence Development Studio
                                                            v.      Client Tools Connectivity
                                                          vi.      Integration Services
                                                        vii.      Client Tools Backward Compatibility
                                                      viii.      Management Tools – Basic
                                                          ix.      Management Tools - Complete
                                                            x.      Microsoft Sync Framework
    1. Click “Next”
    2. Click “Next”
    3. On “Instance Configuration”, click “Next”
    4. On “Disk Space Requirements”, click “Next”
    5. Click “Use the account for all SQL Server Services” button
                                                              i.      Type “contoso\administrator” and “Pa$$w0rd” for password
    1. Click “Next”
    2. Click “Mixed Mode” authentication radio button
    3. For password, type “Pa$$w0rd”
    4. Click “Add Current User”
    5. Click “Next”
    6. Click “Add Current User”
    7. Click “Next”
    8. On report Services, click “Install the SharePoint integrated mode default configuration” radio button
    9. Click “Next”
    10. On “Error Reporting”, click “Next”
    11. On “Installation Configuration Rules”, click “Next”
    12. Click “Install”
    13. Click “Next”
    14.  Click “Close”
  1. Open the SQL configuration manager
    1. Click “Start->All programs->Microsoft SQL Server 2008 R2->Configuration Tools->Sql Server Configuration manager
    2. Expand “SQL Server Network Configuration->Protocols for MSSQLSERVER”
    3. Enable:
                                                              i.      Named Pipes
                                                            ii.      TCP/IP
    1. Restart the sql service
  1. Open SQL Server Management Studio
    1. Connect to sp2010-wfe
    2. Expand Security
    3. Right click Logins, select “New Login”
    4. Add Contoso\sp_admin and Contoso\sp_farm to the dbcreator and securityadmin roles of SQL Server
                                                              i.      Click Server Roles node
                                                            ii.      Check dbcreatore and securityadmin
                                                          iii.      Click OK
  1. Attach the demo databases (Northwind, adventureworks, adventureworks2000, adventureworksDW). 
    1. Download and restore the .bak files of each
    2. Right click Databases, select Restore Database
    3. Click “From device”, browse to the .bak file
    4. Select the checkbox for the backup
    5. Click “OK”
  2. Install “SharePoint 2010” Prereqs
    1. Insert the DVD/start the install
    2. Click “Install Prerequisites”
    1. Click “Next”
    2. Click “I accept the terms…”
    3. Click “Next”
                                                              i.      All pre-reqs will be downloaded and installed (this could take 45 minutes)
                                                            ii.      Install will continue by installing application server role and the other prereqs
    1. Your system may need a restart after this step
  1. Login as CONTOSO\SP_Admin
  2. Install “SharePoint 2010” product
    1. Click “Install SharePoint Server”
    2. Enter your product key
    3. Click “Continue”
    4. Click “I accept…”
    5. Click “Server Farm”
    6. Select “Complete…”
    7. Click “Install Now”
    8. Click “Close”  (uncheck the run configuration wizard)
  3. Install “Office 2010”
    1. Enter your product key, click “Continue”
    2. Click “I accept the terms…” check box
    3. Click “Continue”
    4. Click “Install Now”
    5. Click “Close”
    6. Open “Word 2010”
    7. Click “Use recommended settings”
    8. Click “Ok”
  4. Install “Visio 2010”
    1. Enter your product key
    2. Click “Continue”
    3. Click “I accept the terms…” check box
    4. Click “Continue”
    5. Click “Install Now”
    6. Click “Close”
  5. Install “Microsoft SharePoint Designer 2010”
    1. Click “I accept the terms…” check box
    2. Click “Continue”
    3. Click “Install Now”
    4. Click “Close”
  6. Install “FireFox” browser
    1. Download from http://www.firefox.com
  7. Install “Google Chrome” browser
    1. Download from http://www.google.com/chrome
  8. Install “Apple Safari” browser
    1. Download from http://www.apple.com/safari/
  9. Install “Enterprise Library 4.1”
    1. http://www.microsoft.com/downloads/details.aspx?FamilyId=1643758B-2986-47F7-B529-3E41584B6CE5&displaylang=en
    2. Click “I accept the terms…”
    3. Click “Next”
    4. Click “Next”
    5. Click “Next”
    6. Click “Install”
    7. Click “Launch” to install the source and working copy files
    8. Click “Finish”
  10. Download and install Microsoft SilverLight
  11. Download and install PowerPivot for Excel (32 or 64 bit depending on the office version you installed)
    1. http://www.microsoft.com/downloads/details.aspx?familyid=48A5B47B-8C9C-450F-AB6E-178600A733CA&displaylang=en
    2. Run “PowerPivot_for_Excel.msi”
    3. Click “Next”
    4. Click “I accept…”
    5. Click “Next”
    6. Click “Next”
    7. Click “Install”
    8. Click “Finish”
    9. Open Excel 2010
    10. Click “Install”
    11. Ensure that there is a “PowerPivot” item in the Ribbon
    12. Close Excel
  12. Download and install the Data Service 1.5 (KB976127)
    1. http://www.microsoft.com/downloads/details.aspx?FamilyID=a71060eb-454e-4475-81a6-e9552b1034fc&displaylang=en#filelist
  13. Download and install Fiddler
    1. www.fiddler2.com
  14. Activate Office 2010 and Visio 2010
  15. Run SharePoint Configuration Wizard
    1. Click “Start->All Programs->Microsoft SharePoint 2010 products->SharePoint 2010 Products Configuration Wizard”
    2. In the UAC prompt, click “Yes”
    3. Click “Next”
    4. In the popup, click “Yes”
    5. Select “Create a new server farm”
    6. Click “Next”
    7. For database server, type “sp2010-wfe1”
    8. For username, type “contoso\SP_Farm”
    9. For password, type “Pa$$w0rd”
    10. Click “Next”
    11. For passphrase, type “Pa$$w0rd”
    12. Click “Next”
    13. For the Port, type 9999
    14. Click “Next”,
    15. Click “Next”, SharePoint 2010 will Configure itself
    16. Central Administration will open
                                                              i.      Click the radio button to participate in the feedback program, we gotta make SharePoint better right?!?
    1. Click “Start the Wizard”
    2. For username, type “CONTOSO\SP_Service”
    3. For password, type “Pa$$w0rd”
    4. Click “Next”
    5. Click “Skip”
    6. Click “Finish”
  1. Add a farm administrator
    1. Start->Programs->Microsoft SharePoint 2010 Products->SharePoint 2010 Central Administration
    2. Click “Security”
    3. Click “Manage the farm administrators group”
    4. Click “New->Add Users”
    5. Type contoso\administrator
    6. Click “Ok”
  2. Open the SharePoint Central Administration site and setup Outgoing Email
    1. Click “System Settings”
    2. Click “Configure out-going email Settings”
    3. For outbound smtp, type “sp2010-wfe1”
    4. For from address, type “sharepoint@contoso.com”
    5. For reply address, type sharepoint@contoso.com
    6. Click “Ok”
  3. Configure Reporting Services
    1. Click “Start->Programs->Microsoft SQL Server 2008->Configuration Tools->Reporting Service Configuration Manager”
    2. Click “Connect”
    3. Click “Web Service URL”
    4. Click the URL that is displayed for the web service url (ensure that the web service responds it may take a few seconds or a minute or two)
                                                              i.      If promoted, type “Contoso\administrator” with password “Pa$$w0rd”
    1. Click “Execution Account”
    2. Click “specify an execution account” checkbox
    3. For account type “CONTOSO\Administrator”
    4. For password, type “Pa$$w0rd”
    5. Click “Apply”
    6. Close the Configuration Manager
  1. Configure Reporting Services Add-in
    1. Open Central administration
    2. Click “General Application Settings”
    3. Click “Reporting Services Integration”
    4. For report server url, type http://sp2010-wfe1/ReportServer
    5. For the auth mode, select “Windows Authentication”
    6. For username, type “contoso\administrator”
    7. For password, type “Pa$$w0rd”
    8. Click “OK”
    9. Click “Close”
    10. Click “Set server defaults”, just ensure that the page loads without error
  2. Start services on a server
    1. Open “Central Administration”
    2. Click “System Settings”
    3. Click “Manage services on server”
    4. Start all services, except for “Lotus Notes Connector”
                                                              i.      NOTE: Install “Document Conversions Load balancer” before you start the launcher service, select “sp2010-wfe1” when setting up the launcher service.
                                                            ii.      For Foundation Search, use the following settings:
1.      For Username type, “contoso\administrator”
2.      For password, type “Pa$$w0rd
3.      For content access account type “contoso\adminsitrator”
4.      For password, type “Pa$$w0rd”
5.      Click “Start”
  1. Start UPS Services
    1. Click “Start” for “User Profile Synchronization Service”
    2. For password, type “Pa$$w0rd”
    3. Click “OK”
    4. NOTE:  The starting of this service can take 20 minutes
    5. Run IISRESET
  2. Configure the User Profile service
    1. Click “Application Management”
    2. Click “Manage service applications”
    3. Click “User Profile Service Application”
    4. Click “Configure Synchronization Connections”
    5. Click “Create new connection”
    6. For connection name, type “Contoso.com”
    7. For forest name, type “contoso.com”
    8. For account name, type “contoso\administrator”
    9. For password, type “Pa$$w0rd”
    10. Click “Populate Containers”
    11. Expand “Contoso”
    12. Click the 3rd “Contoso”, click the “Service Accounts”, click the “Users”
    13. Click “Ok”
  3. Start profile synchronization
    1. Click “Application Management”
    2. Click “Manage service applications”
    3. Click “User Profile Service Application”
    4. Click “Start Profile Synchronization”
    5. Click the “Start Full Synchronization” radio button
    6. Click “OK”
  4. Make the quicklaunch bar horizontal and add the following items to quicklaunch (you can do this by navigating to the respective program icon in the start menu, right click, Add To Quick Launch)
    1. FireFox
    2. Opera
    3. Safari
    4. Internet Explorer
    5. SharePoint Designer 2010
    6. Visio 2010
    7. SQL Server Management Studio
    8. Command Prompt
    9. A Shortcut to the SharePoint Root (14 hive)
    10. Enterprise library console (c:\program files(x86)\Microsoft Enterprise Library 3.1 – May 2007\Bin\EntLibConfig.exe)
    11. Services Applet
                                                              i.      Available under Start->Administrative Tools->Services
    1. IIS Manager
                                                              i.      Available under Start->Administrative Tools->Internet Information Services (IIS) Manager
    1. SharePoint Central Administration Console
                                                              i.      Available under Start->Programs->Microsoft SharePoint 2010 Products->SharePoint 2010 Central Administration
    1. SharePoint 2010 management Shell
                                                              i.      Available under Start->Programs->Microsoft SharePoint 2010 Products->SharePoint 2010 Management Shell
  1. Your quick launch should now look like this:


64.  Open Windows explorer
a.       Click “Organize->Folder and search options”
b.      Click the View tab
c.       Select the “Show hidden files,folders or drives
d.      Uncheck Hide empty drives in the computer folder
e.       Uncheck hide extensions for known files types
f.       Click “OK”
65.  Download MailEnable Standard (http://www.mailenable.com/download.asp)
a.       Run “mailenablestandard”
b.      Click “Run”
c.       Click “OK”
d.      On “Welcome”, click “Next”
e.       On “Get Installation Settings”, click “Next”
f.       On “Terms and Conditions”, click “Next”
g.      On “Mail Enalble messaging services for Microsoft Windows”, click “Next”
h.      On “Choose Program Files Location”, click “Next”
i.        On “Select Program manager Group”, click “Next”
j.        On “Mailenable Repository”, click “Next”
k.      For the Post office Name, type “Constoso”
l.        For password, type “Pa$$w0rd”
m.    Click “Next”
n.      Ensure the domain is “Contoso.com”
o.      Ensure the DNS is set to “10.0.0.11”
p.      Ensure the SMTP port is 25
q.      Click “Next”
r.        Click “Next”, mailenable will install
s.       Uncheck the “configure web mail as…” check box
t.        Click “Next”
u.      Click “OK”
v.      Click “Finish”
66.  Configure MailEnable
a.       Click “Start->All Programs->Mail Enable->MailEnable Administrator”
b.      Expand “MailEnable Management->Messaging Manager->Post Offices->Contoso”
c.       Select “MailBoxes”
d.      Right click, select “New->Mailbox”
e.       For mailbox name, type “administrator”
f.       For password, type “Pa$$w0rd”
g.      Click “Ok”
h.      Expand “MailEnable Management->Servers->localhost->services”
i.        Right click “POP”, select “Start”
j.        In “Servers->localhost->System->Services”, disable:
                                                                          i.      MailEnable Mail Transfer Agent
67.  Configure SMTP service
a.       Add the SMTP feature to the image (if you haven’t already)
b.      Open the IIS Manager for 6.0
c.       Right click the “SMTP Virtual Server”, select “Start”
d.      Click “Domains”
e.       Right click, select “New-Domain”
f.       Click “Next”
g.      For name, type “contoso.com”
h.      Click “Finish”
i.        Right click the domain, select “Properties”
j.        Click the “Allow incoming…” checkbox
k.      Click “OK”
68.  Open Outlook 2010
a.       Click “Next”
b.      Click “No”
c.       Click “Next”
d.      Click “Continue with no email support” checkbox
e.       Click “Finsih”
f.       Click “File->Account Settings”
g.      On Email tab, click “New”
h.      Click “Manually configure server settings…”
i.        Click “Next”
j.        Click “Next”
k.      For name, type “Administrator”
l.        For email address, type administrator@contoso.com
m.    For incoming mail server, type “10.0.0.21”
n.      For outgoing mail server, type “10.0.0.21”
                                                              i.      NOTE: make sure the server IP address is 10.0.0.21
                                                            ii.      For username, type “administrator@contoso”
                                                          iii.      For password, type “Pa$$w0rd”
o.      Click “Next”
p.      Click “Finish”
q.      Click “Close”
r.        Close Outlook
69.  Shutdown the VM
==============================================================