All posts by Ayman El-Hattab [MVP]

Ayman El-Hattab is a Technology Evangelist @ Nintex & a recognized industry expert focusing on helping organizations plan, design, develop, build, govern and operate enterprise collaboration solutions. You can follow Ayman on Twitter @AymanElHattab to stay updated on his upcoming activities.

SHAREPOINT 2010 AND OFFICE 2010 COMMUNITY LAUNCH IN EGYPT

May 12 is going to be an exciting time.  Not only because SharePoint 2010 Launch, but because a lot of usare really going to be getting together to celebrate the most important launch!.  Join us On May 12 at 3:30 PM @ Microsoft Egypt, Smart Village to celebrate the launch and learn about the great features in SharePoint 2010.

Till now, there will be more than 60 community launch parties  across 5 continents running simultaneously, celebrating one of the most important launches in Microsoft history and we are really glad to be part of this huge global initiative. I would like also to extend a special thank-you to AvePoint for sponsoring Egypt SharePoint User Group.

 

Agenda :

15:45 – 16:00 Introduction Kailash Kalyani [Microoft]
16:00 – 17:00 Virtual Keynote Stephen Elop [Microsoft]
17:00 – 17:30 Break
17:30 – 17:50 PowerPivot in SharePoint 2010 Hesham Mortada [Microsoft]
17:55 – 18:15 Visual Studio Tools for SharePoint 2010 Ayman El-Hattab [SharePoint MVP]
18:20 – 18:40 Web Parts Development for SharePoint 2010 Shady Khorshied [SharePoint MVP]
18:45 – 19:05 Office Web Applications Mohamed Yehia
19:10 – 19:30 Windows PowelShell for SharePoint 2010 Marwan Tarek [SharePoint MVP]

 

RSVP to the Facebook event here.

Stay tuned for more information about transportation ..

Read Also : 15 New SharePoint 2010 Launch Community Parties To Be Announced by Joel Oleson

Programmatically enforcing a field value uniqueness in SharePoint 2010

The following code snippet shows how to programmatically modify a field to enforce the uniqueness of its values (like the unique constraint in SQL Server).

SPField titleField = myList.Fields.GetField(“Title”);
titleField.Indexed = true;
titleField.EnforceUniqueValues = true;
titleField.Update();

Oh, and this only applies to SharePoint 2010, Unique fields are completely new to 2010..

Hope this helps!

USPJ Academy Applications Open Tomorrow

Tomorrow, on Tuesday 13th, USPJ Academy will open up for new applications for the early access program.

First, if you want to convince your boss to let you attend, check this  brief 5-minute video explaining all your boss may need to know:
http://www.uspja.com/dearboss

Let me also briefly mention what you’ll get at USPJ Academy:

  1. Unlimited self-paced courses
  2. Up to three concurrent collaborative classes, facilitated by SharePoint industry experts
  3. Access to virtual labs as much as you want
  4. Library with SharePoint books, articles, lectures, videos, and more
  5. Faculty blog containing exclusive and rapidly updated information
  6. Superstar lectures where we invite the best SharePoint people to speak
  7. Campus forums to share or learn from other students and faculty members

For more information about the academy check www.uspja.com and let me know if you have any questions.

Binding To Non Public Members in SharePoint Workflows!

Yesterday, I received an email from Ahmed Omar ElSakka asking me the following question:

I am new to SharePoint Workflows; when creating SharePoint Custom Workflows using Visual Studio 2008, I saw many blog posts and articles saying that you should declare the properties and fields within the workflow code as public so that you can use them from the workflow activities and bind them to activity properties. I have tried to declare some properties as private or protected and yes I couldn’t find them in the dialog box when trying to bind the HistoryDescription of LogToHistoryListActivity to one of those private members, any justifications?

My answer is:

Yes Ahmed, this is true; you cannot bind activity properties to non public members and this is attributed to the serialization mechanism used by the workflow foundation.

In other words, workflow instances stay in the memory for a relatively small time . When a workflow is waiting for an event to occur (like OnTaskChanged), the workflow runtime serializes the workflow state into XML by performing a shallow copy which means that the runtime only reads the public members when serializing the workflow instances and stores the state by calling the workflow host persistence interface. When the workflow receives a notification to get back to life (for example when the task is changed), the workflow host deserializes the XML into a new instance of the Workflow type, so if you are planning to use activities that need data, declare the workflow class members that reference this data as public”.

I hope this answers you question Ahmed.

Now on CodePlex: SPListConfiguration Feature

SPListConfiguration is a SharePoint feature that developers can use to configure their SharePoint lists using XML and without the need of writing .NET code.

SPListConfiguration can be used for many different purposes. For example, you can use it to set most of theproperties for the 5SPList object that references your list or to stop inheriting permissions from the parent web. You can even use it to add properties to the property bag of the list root folder.

For configuring a list using SPListConfiguration, you should specify the list name in the preoperty Key and the desired configuration settings in the property value as shown below :

<Properties>
<Property Key=”Calendar” Value=”Hidden,true;EnableVersioning,false;AddToPropertyBag,MyKey:MyValue”/>
<Property Key=”Tasks” Value=”BreakRoleInheritance,false;ReadSecurity,2″/>
</Properties>

The previous XML does the following on your behalf :
SPList.Hidden = true;
SPList.EnableVersioning= false;
SPList.BreakRoleInheritance(false);
SPList.ReadSecurity = 2;
And it also adds a property of name “MyKey” and value “MyValue” to the property bag of the SPlist root folder. Neat, eh ? This is the Reflection magic:)

SPListConfiguration can be used in two ways:

1) From a site definition; in the <WebFeatures> element.

<WebFeatures>
<Feature ID=”9697591b-c325-43e8-bf2f-3c33e05c59b4″>
<Properties>
<Property Key=”Calendar” Value=”Hidden,true;EnableVersioning,false;AddToPropertyBag,MyKey:MyValue”/>
<Property Key=”Tasks” Value=”BreakRoleInheritance,false;ReadSecurity,2″/>
</Properties>
</Feature>
</WebFeatures>

2) Since the key component of this feature is its feature receiver which performs all the heavy lifting,
you can only use the feature receiver assembly and hook it up as a receiver for your features :

<Feature Id=”ID of Your Feature” Title=”Countries List”
Description=”A list that contains all the countries of the world”
Hidden=”FALSE” Scope=”Web”
ReceiverAssembly=”SPListConfigurationFeature, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=064ae22bb48e8f1b”
ReceiverClass=”SPListConfigurationFeature.SPListConfigurationFeature”
xmlns=”http://schemas.microsoft.com/sharepoint/”&gt;
<ElementManifests>
<!– The countries List is created here –>
<ElementManifest Location=”elements.xml”/>
</ElementManifests>
<Properties>
<!– The countries List is configured here –>
<Property Key=”Countries” Value=”Hidden,true;BreakRoleInheritance,false”/>
</Properties>
</Feature>

Also keep in mind that you set any list properties of type String, Boolean or Int32 and this covers almost 95% of the available properties.

Let me know what you think !

Speaking at SharePoint Saturday India

After SharePoint Saturday EMEA and SharePoint Saturday Arabia and the great feedback we received from our attendees, it’s now India’s turn!

I have just received an e-mail from Rajendra Shekhawat informing me that my abstract for speaking at Live Online SharePoint Saturday India has been accepted, I’m really glad to be there and share some SharePoint tips and tricks with the Indian SharePoint folks.

Rajendra and his fellow organizers are currently in the process of finalizing the session topics and timings for the  event. Previously, they were planning to do multiple tracks for the event on 24th April 2010. However, based on the registrants feedback, they divided the event over two Saturdays – 24th of April 2010 and 8th of May 2010. My session is scheduled to be on 8th of May.

The event is free, click here to register.

Session Details

Title: Troubleshooting SharePoint Solutions
Description:  SharePoint troubleshooting can really be a nightmare for those who are new to the platform if it is not performed properly. Bugs, performance and storage issues are the main reasons why you as SharePoint developer are subjected to lengthy and tiresome projects—complete with crabby stakeholders, grouchy quality engineers, missed deadlines, and late nights. This session will help SharePoint developers learn how to author both SharePoint 2007 and 2010 applications with fewer bugs in the first place and walks them through the tools and techniques available at their disposal when encountering any kind of troubles.
Date: 8 May 2010
Time:  10:30 AM ( GMT +0 ) – 12:30 PM ( Cairo Time)
Duration: 1 hour
Language: English

EgyGeeksOnSkype ?

Yesterday (Sunday, April 4th), Mohamed Meligy, Ramy Mahrous, Emad Mokhtar, Mohamed Gamal, Doha ElSayed and myself had a wonderful talk on skype. This meeting was not scheduled, it started by a conversation on twitter about how we are going to spend the easter day, then we moved to TinyChat and we ended up on Skype talking about different technical and non-technical topics.

The interesting part about this talk is that we came up with the “EgyGeeksOnSkype” idea! It’s simply an online gathering for Egyptian geeks (Non Egyptians are most welcome to join) to discuss different technical and non-technical topics.

We will start next Friday (April, 9th) at 11:59 PM Cairo Time (GMT +2), I will be speaking about “No-Code SharePoint Solutions” from 12:00 AM to 12:30 AM followed by an open discussion about OData.

To join the conversation add “mohamed.meligy”, “rmahrous”, “emad.mokhtar.habib”, “aymanelhattab” or “gamalilio” on skype and don’t forget to follow the hashtag #EgyGeeksOnSkype” on twitter.

Don’t miss it!

See Also : Join the Egyptian Geeks On Skype, Weekly by Mohamed Meligy

Top 20 SharePoint MVP MSDN Rankings

@givenscj has done a great job coming up with a list for SharePoint MVP MSDN Rankings, I have listed here the top 20 MVPs. For the full list, please refer to this blog post to know where your favorite SharePoint MVP stack up in the forums.

Oh, and I’m ranked the 14th 🙂

Name | Points | Posts | Answers

1) Mike Walsh      | 48357 | 15438 | 1657
2) Paul Galvin      | 15895 | 3304 | 890
3) Fabrice Romelard| 9585 | 1264| 683
4) Mike Oryszak    | 8139 | 1326| 500
5) Moonis Tahir    | 7054 | 1186| 468
6) John D. Ross    | 6919 | 1495| 348
7) Waldek Mastykarz| 6437 | 1110| 396
8) Gary Lapointe   | 4972 | 807 | 318
9) Ishai Sagi      | 3830 | 596 | 255
10) Randy Drisgill  | 3382 | 623 | 206
11) Michael Nemtsev | 3324 | 717 | 198
12) John Timney     | 3091 | 436 | 207
13) Wictor Wilen    | 2683 | 428 | 164
14) Ayman El-Hattab | 2308 | 268 | 113
15) Becky Bertram   | 2061 | 273 | 134
16) MatthewMcDermott| 2043 | 619 | 089
17) Andrew Woodward | 1570 | 386 | 085
18) Mirjam Van Olst | 1504 | 234 | 089
19) Scot Hillier    | 1299 | 212 | 082
20) Stephane Eyskens| 1252 | 227 | 074