Thursday, June 30, 2011

Migrate a Single List to SharePoint 2010 from 2007

Challenge:
I recently needed to move a list from SharePoint 2007 to SharePoint 2010.  I wanted the destination list to have the exact content as the source list including structure, list items, and attached files.  Since SharePoint does not have an STSADM.EXE command line tool to accomplish this, it needs to be done manually.  What are our options?

Solution:
After doing some research, I discovered that there are a few ways to accomplish this task.  You can migrate a single list from SharePoint 2007 to SharePoint 2010 using one of four methods:
  1. Migrate a single list from SharePoint 2007 to 2010 using a list template
  2. Migrate a single list from SharePoint 2007 to 2010 using an Access table
  3. Migrate a single list from SharePoint 2007 to 2010 using the detach database method
  4. Migrate a single list from SharePoint 2007 to 20110 using PowerShell
I'll summarize and show how each of these methods works in this article.
Method 1 - Migrate a single list from SharePoint 2007 to 2010 using a list template
The first method to consider is creating a list template from SharePoint 2007 and bringing it into SharePoint 2010. But you will likely be disappointed to learn that SharePoint 2010 will not recognize this template, so you cannot create any list from that template.  A workaround for this problem is posted on Tom's Random Ranting blog, showing how you can easily modify the manifest file that gest created every time you create a template.
Tom's basic method is:
  • Extract the contents of the STP file (it's really just a CAB file)
  • Edit the manifest.xml file, changing the ProductVersion element from 3 to 4
  • Repackage the STP file
It is quick way to bring a list over, but there is one important limitation: if your source list has many items (thousands), you might not be able to copy the entire contents of the list.

Method 2 - Migrate a single list from SharePoint 2007 to 2010 using an Access table
The second way to migrate a list from 2007 to 2010 is to use Access. Basically, you need to export a MOSS 2007 list to an Access table, and then import to SharePoint 2010:
Step 1:  Open source list with Access

Step 2: Select Export a copy of the data to a new database

Step 3: The SharePoint list will now be imported into Access.  You can add or modify columns in this mode to select what you need.


Step 4: From Access, select External Data tab in the Ribbon, and select SharePoint List in the Export section. Enter a SharePoint 2010 site address and select OK.

Your result should appear as follows:

You might be wondering if this method also works with a Document Library since the Document Library doesn't have the menu Action -> Open for Access!  Yes, of course it does, but for a Document Library, you need to use the similar "Open with Windows Explorer" menu action.
Step 1: Open both Document Libraries with Window Explorer


Step 2: Select all the documents and folders that you need, and select Copy.

Step 3: Paste the data into the destination folder.

And the result is:

Limitation
You will notice that one of the limitations of this migration method is that the Modified Date, Created Date, Modified By, and Created By columns do not retain their values from the source list.  You also need to have Microsoft's Access 2010 in order to use this method.

Method 3 - Migrate a single list from SharePoint 2007 to 2010 using the detach database method
In this method, we will try to migrate using an STSADM command that is supported by SharePoint 2007.  All we have to do is use the Export and Import command to migrate a list.
Step 1:  Migrate the entire SharePoint site that contains the list to be exported from 2007 to 2010.  Please refer to an earlier post in the Cookbook series, How to Migrate a SharePoint 2007 Site to SharePoint 2010 Using Database Attach, for the exact steps on how to do this.  You might have to create a new temporary site in SharePoint 2010 in order to migrate the site, but the site can then be removed after the desired list has been migrated.
Step 2: Once the site has been migrated to SharePoint 2010 server, let's try to move the sample Tasks list.  From Central Admin -> Backup, select Restore -> Export a site or list:

In the selection drop down box,select the list that you want to move:


At this point, you have exported the desired list to a folder on your SharePoint server, and you are now ready to import that List to the correct destination.
Step 3. Next, import the Tasks list to your final destination site.   SharePoint 2010 does not provide a User Interface in Central Admin for Granular Restore operations; therefore, you have to use PowerShell to accomplish this task:

And below is the result:


Method 4 - Migrate a single list from SharePoint 2007 to 2010 using PowerShell
Lastly, we will try to use PowerShell to Export/Import lists. We know that Microsoft has released a version of Windows PowerShell 1.0 that works with SharePoint 2007,  and which can be downloaded here.  After the installation has completed, we can write a PowerShell script to try to accomplish our goal of exporting a list.
The basic steps are:
  • Run a shell script to export a list to a DAT file
  • Change this DAT file to CAB, and extract this file so that you can access SystemData.xml in the CAB file, and modify version information there.
  • Remake the CAB file and change the extension to .CMP.
  • Use PowerShell in SharePoint 2010 to import the list from the .CMP file.
Step 1: Launch PowerShell and load SharePoint assemblies to the program.  Refer to this blog post by Nick Grattan in order to prepare your PowerShell for SharePoint 2007: http://nickgrattan.wordpress.com/2007/09/03/preparing-powershell-for-sharepoint-and-moss-2007/:

Let's write a script to export a SharePoint 2007 List. I will follow an example from Kashish Sukhija's Blog here: http://blogs.sharepointdevelopers.info/2010/05/sharepoint-2010-deployment-using.html.
[System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
[System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
$spsite=[Microsoft.SharePoint.SPSite] ("http://cleanmoss/test")
$spweb=$spsite.OpenWeb()
$openList=$spweb.Lists["Tasks"]
$exportObject = New-Object Microsoft.SharePoint.Deployment.SPExportObject
$exportObject.Type = [Microsoft.SharePoint.Deployment.SPDeploymentObjectType]::List
$exportObject.IncludeDescendants = [Microsoft.SharePoint.Deployment.SPIncludeDescendants]::All
$settings = New-Object Microsoft.SharePoint.Deployment.SPExportSettings
$settings.ExportMethod = [Microsoft.SharePoint.Deployment.SPExportMethodType]::ExportAll
$versions = [Microsoft.SharePoint.Deployment.SPIncludeVersions]::All
$settings.IncludeVersions = $versions
$settings.IncludeSecurity = [Microsoft.SharePoint.Deployment.SPIncludeSecurity]::All
$settings.OverwriteExistingDataFile = 1
$settings.SiteUrl = $spweb.Url
$exportObject.Id = $openList.ID
$settings.FileLocation = "C:\Temp\BackupRestoreTemp\"ExportList-"+ $openList.ID.ToString() +".DAT"
$settings.BaseFileName = "
$settings.FileCompression = 1
$settings.ExportObjects.Add($exportObject)
$export = New-Object Microsoft.SharePoint.Deployment.SPExport($settings)
$export.Run()
 

After you have run this shell script you will have your export list in the c:\temp\BackupRestoreTemp\ folder.
Step 2:  Next, all we have to do is change this DAT file to CAB, extract the file so that you can access SystemData.xml in the CAB file, and modify the version information there. Open the SystemData.xml file in a text editor, and change Version="12.0.0.0" to Version="14.0.0.0", and Build="12.0.0.6514" to Version="14.0.4762.1000".
Step 3:  You will have to create a new CAB file again after making the changes above.  Here is a reference showing how to make a CAB file using the Makecab.exe command: http://msdn.microsoft.com/en-us/library/dd583149(office.11).aspx.  This is sample content to create the CAB:
.OPTION EXPLICIT     ; Generate errors 
.Set CabinetNameTemplate=ListTasks.cab       
.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single
.Set CompressionType=MSZIP;** All files are compressed in cabinet files
.Set UniqueFiles="OFF"
.Set Cabinet=on
.Set DiskDirectory1=ListTasks.CAB
 
; Include all files need to be presented in Cab.
manifest.xml
ExportSettings.xml
Requirements.xml
RootObjectMap.xml
SystemData.xml
UserGroup.xml
ViewFormsList.xml
00000000.dat
00000001.dat
00000002.dat
00000003.dat
00000004.dat
00000005.dat
00000006.dat
00000007.dat
00000008.dat
00000009.dat
0000000A.dat
0000000B.dat
0000000C.dat

Step 4: Finally, we can use PowerShell on SharePoint 2010 server and run the Import-spweb to import the list.

Result:

In summary, if you have a need to just import a SharePoint list from an existing SharePoint 2007 farm to a SharePoint 2010 farm, there are several ways to accomplish this task.  Which method you should use will depend on the tools that you have available, and your familiarity with each of them.  Note: There are also third-party tools available to help you with migrating sites and content in SharePoint and, for list migration specifically, you may wish to look at Bamboo's own List Bulk Import product.

Notes:
  • Using the last two methods described, we will be able to retain the original values of Modified Date, Created Date, Created By, and Modified By from the source list. Make sure to specify the parameter -IncludeUserSecurity in your import command.
  • Most of the steps we have shown in this article will require you to have Farm administration rights in order to run the necessary import and export commands.
  • If your source list contains any custom columns, you might have to install that feature on the destination SharePoint 2010 farm before doing the migration.

See Also:

Thursday, June 16, 2011

How to make an application page (_layouts page) in SharePoint anonymous?

Scenario:
How to make an application page (_layouts page) in SharePoint anonymous?

Explanation:
The application pages (custom pages that are created inside the layouts folder) in SharePoint  will ask for authentication even when a user tries to access them from a site that is configured for anonymous access (public facing site).

Resolution:

  • Make sure that the application page is inherited from "Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase"
  • Override the AllowAnonymousAccess property and return true

If the application page does not have code-behind, the below snippet will mark the property "AllowAnonymousAccess" to true:

protected override bool AllowAnonymousAccess

    get
    { 
        return true; 
    } 
}
</script>



download file, (tested):
https://sites.google.com/site/nidovan82/WebTaggingDialog.aspx?attredirects=0&d=1


original post:
http://underthehood.ironworks.com/2010/11/how-to-make-an-application-page-_layouts-page-in-sharepoint-anonymous.html

Wednesday, June 15, 2011

Cascaded Lookups Sharepoint 2010 - JavaScript based

tested
Note: Make sure to add Content Editor Webpart after the edit form. and the source lists need to be in the same site.

http://spcd.codeplex.com/releases/view/40417

Monday, June 13, 2011

JQuery - Navigate and Replace HTML Code

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>

$(document).ready(




$(theLink).replaceWith(open
});
 

<script type="text/javascript"> function() {var theurl = $"div[Title='facebookLink'] > a") ;var theLink = $"div[Title='facebookLink']"); var open = '<a href="';var close = '"> link </a>';+ theurl.attr('href')+ close);</script> ((

Friday, June 3, 2011

Login Webpart -claims-login-web-part-for-sharepoint 2010

SharePoint 2010 FBA Pack 1.0.2

http://sharepoint2010fba.codeplex.com/releases/view/65909

A forms based authentication pack for SharePoint 2010. It includes web parts for registering users, changing passwords and password recovery. It includes tools for managing users and roles and for approving registrations. This is a port of the CKS Forms Based Authentication Solution for SharePoint 2007.

Contents
  1. Membership Request Web Part
    MembershipRequestWebPart
  2. Change Password Web Part
    ChangePasswordWebPart
  3. Password Recovery Web Part
    PasswordRecovery
  4. Change Password Page
    ChangePasswordPage
  5. User Management
    ManageUsers
  6. Role Management
    ManageRoles
  7. Membership Review
    ReviewUsers
  8. FBA Pack Configuration
    Configuration

 

Thursday, June 2, 2011

كيفيه اضافة اللغه العربيه Adobe flash عن طريق ملف XML

الطريقة ممكـنة ومجربـه ، ولكنك لم توضح للاخوه انه الادوبي فلاش ( adobeflasch cs )
يمكـن اضافة اللغه العربية الى مشغل الفلاش عن طريـق ملف الاكسـ ام ال والاكشـن اسكربت
وذلك باكثر من مأئة طريقة ، وكل مصمم له طريقتة
اقدم لك الطريقة المبسطه  بأستخدام AS 2

1- تقوم بعمـل حقل نصي TXT يجب ان يكون Dynamic Text
قم بتعريف الحقل النصي بأي اسم ، مثلاً txt_a
تأكد من تغيير الخط الى tahoma اولاً لانه ييقبل العربي على طول من خلال الاكسـ ام ال
قم بتغيير الحجم الى الي تريد واللون والاشياء هذه
وقم بتغيير
Anti - Alias الى
use device fonts
الان تصلح طبقه جديده فوق طقبة الحقل النصي من شان الاكشـن سكربت
وتضيـف الكود
التالي

var x:XML = new XML();
x.ignoreWhite = true;

var arabic:Array = new Array();

x.load("jihad.xml");

x.onLoad = function(success) {
var content:Array = this.firstChild.childNodes;
for(i=0;i<content.length;i++) {
arabic.push(content[i].attributes.arabic);
}

txt_a.text = arabic;
}

انتهى الاكشـن سكربت
الان تفصيـل
jihad.xml
هو الملف الخارجي الذي سوف يكون المحتوى العربي فيه

ملف الاكس ام ال بايكون داخله كذا
_____

<?xml version="1.0" encoding="utf-8"?>

<slideshow>

<content arabic="المحتوى بالعربي" />

</slideshow>
____
انتهى
، يمكـنك تفكيك الاكواد والمقارنه وفهم الكود
للمزيـد من المعلومات عن الفلاش يمكـنك طرح اسئلتك في اي وقت على صفحتي :)

دعواتكم

Enable Anonymous Access in SharePoint 2010

http://www.topsharepoint.com/enable-anonymous-access-in-sharepoint-2010



don’t forget to check-in your Master page in order for the changes to take effect. For “Anonymous”, make sure you selected the right site and do an iisreset.

Wednesday, June 1, 2011

75+ Cool SharePoint based Portals

75+ Cool SharePoint based Portals

Proven Distributed Data Grid
Don’t trust your mission-critical apps to first generation distributed caches. ScaleOut StateServer® is in production use - now - at hundreds of companies worldwide. Download a free evaluation copy!
Microsoft SharePoint makes it easier for people to work together, set up Web sites to share information with others, manage documents from start to finish, publish reports to help everyone make better decisions etc. SharePoint is the most popular high-level enterprise web application platform used today. Here are more than 75 cool SharePoint based portals. Enjoy and Share!

1. Saudi Post

Saudi Post

2. King Abdulaziz City for Science and Technology

King Abdulaziz City for Science and Technology

3. Dubai eGovernment

Dubai eGovernment

4. Emirates

Emirates

5. Emirates Foodstuff and Mineral Water Company

Emirates Foodstuff and Mineral Water Company

6. Aswaaq

Aswaaq

7. Audit Bureau Qatar

Audit Bureau Qatar

8. Higher Education Commission Pakistan

Higher Education Commission Pakistan

9. Nuqul Group

Nuqul Group

10. Majid Al Futtaim Properties

Majid Al Futtaim Properties

11. Bank AlJazira

Bank AlJazira

12. Sharjah Museums Department

Sharjah Museums Department

13. Qatar General Electricity and Water Corporation

Qatar General Electricity and Water Corporation

14. National Bank Of Kuwait

National Bank Of Kuwait

15. King Fahd University of Petroleum and Minerals

King Fahd University of Petroleum and Minerals

16. Abu Dhabi Judicial Department

Abu Dhabi Judicial Department

17. Emirates Identity Authority

Emirates Identity Authority

18. University of Sharjah

University of Sharjah

19. Oman Information Technology Authority

Oman Information Technology Authority

20. Zain Jordan

Zain Jordan

21. Dubai Bank

Dubai Bank

22. Jumeirah Hotels and Resorts

Jumeirah Hotels and Resorts

23. Qatar National Day

Qatar National Day

24. Umniah

Umniah

25. Egyptian Ministry of Health

Egyptian Ministry of Health

26. Dabur India

Dabur India

27. Securities and Commodities Authority

Securities and Commodities Authority

28. Sultanate of Oman Ministry of Education

Sultanate of Oman Ministry of Education

29. Tata Teleservices Limited

Tata Teleservices Limited

30. Sabis

Sabis

31. MeMega

MeMega

32. Egyptian Government Services Portal

Egyptian Government Services Portal

33. Egypt Post

Egypt Post

34. Star Union Dai-ichi

Star Union Dai-ichi

35. Dubai Economic Department

Dubai Economic Department

36. Oman Mobile Telecommunications

Oman Mobile Telecommunications

37. Infosys Technologies

Infosys Technologies

38. Arab African International Bank

Arab African International Bank

39. ITWorx

ITWorx

40. Center for Documentation of Cultural and Natural Heritage Egypt

Center for Documentation of Cultural and Natural Heritage Egypt

41. ITQAN Al Bawardi Computers

ITQAN Al Bawardi Computers

42. Dubai Customs

Dubai Customs

43. The Emirates Group

The Emirates Group

44. Xelleration

Xelleration

45. Logta

Logta

46. KASB Bank

KASB Bank

47. Petroleum Development Oman

Petroleum Development Oman

48. Kuwait Oil Company

Kuwait Oil Company

49. Water Authority of Jordan

Water Authority of Jordan

50. Patni Computer Systems

Patni Computer Systems

51. NIIT Limited

NIIT Limited

52. Edita Food Industries

Edita Food Industries

53. Aditya Birla Financial Services

Aditya Birla Financial Services

54. Larsen & Toubro Limited

Larsen & Toubro Limited

55. Technology Innovation and Entrepreneurship Center Egypt

Technology Innovation and Entrepreneurship Center Egypt

56. Lavasa

Lavasa

57. Mahindra Group

Mahindra Group

58. Egypt Ministry of Communications and Information Technology

Egypt Ministry of Communications and Information Technology

59. Cera Sanitaryware Limited

Cera Sanitaryware Limited

60. Hydro One

 Hydro One

61. EFG-Hermes

EFG-Hermes

62. Ministry of State for Administrative Development Egypt

Ministry of State for Administrative Development Egypt

63. Cybage Software Private Limited

Cybage Software Private Limited

64. TVC Sky Shop

TVC Sky Shop

65. UST Global

UST Global

66. Whitireia New Zealand

Whitireia New Zealand

67. New Belgium Brewing

New Belgium Brewing

68. AgResearch

AgResearch

69. Penn National Insurance

Penn National Insurance

70. City of Poway

City of Poway

71. Smart Villages Company Egypt

Smart Villages Company Egypt

72. Persistent Systems Limited

Persistent Systems Limited

73. Eastman Chemical Company

Eastman Chemical Company

74. Avanade

Avanade

75. On the Dot

On the Dot

76. Conservation International

Conservation International

77. Upper Chesapeake Health

Upper Chesapeake Health

78. InnovaSystems International

InnovaSystems International

79. Office of Naval Research

Office of Naval Research

80. Ferranti Computer Systems

Ferranti Computer Systems
You may also like to check out: