Saturday, April 12, 2014

Syedna Mufaddal Saifuddin (TUS) - 53rd Dai-al-Mutlaq of the Dawoodi Bohra Community

Syedna Mufaddal Saifuddin (TUS) is the second son of Syedna Mohammed Burhanuddin (RA) and now, after the sad demise of Syedna Burhanuddin, is the leader of the world wide Dawoodi Bohra Community. He is the 53rd Dai-al Mutlaq in the line of Doat Mutlaqeen of the Dawoodi Bohras.

A brief profile of Syedna Mufaddal Saifuddin is available here. You can also read more about the Dawoodi Bohra community in my blog here.

Lesser known facts about Syedna Mufaddal Saifuddin are:

  1. Syedna Mufaddal Saifuddin is a descendent of:
  2. He had performed the historic journey of Yemen in 1391 H/ 1971 AD to lay the foundation of Syedna Hatim (RA)'s mausoleum. The enemies in Yemen had turned up with guns to prevent the construction of the mausoleum but it was Syedna Mufaddal Saifuddin who had fearlessly confronted them. It was after this journey that Syedna Mohammed Burhanuddin had bestowed upon him the title of Aqeeq-ul Yemen.
  3. During the historic restoration of Al-Jame-al-Anwar Mosque in Cairo it was Syedna Mufaddal Saifuddin who had been entrusted with the cleaning of the Jame by Syedna Burhanuddin, a task which UNESCO was not willing to take up due to the excessive amount of trash dumped there.
  4. After the restoration of Al-Jame-al-Anwar, Syedna Mohammed Burhanuddin was concerned about the type of lighting that could be used to adorn the Jame, at that time Syedna Mufaddal Saifuddin had suggested lighting it with the designs used during the period of Imam Hakim (AS) called the Mishkat-al Anwar. Syedna Mohammed Burhanuddin had replicated that design in almost every Dawoodi Bohra Masjid since, such was the value of His suggestion for Syedna Burhanuddin. Below is an image of the Mishkat: 


Syedna Mufaddal Saifuddin has also been instrumental in implementing many initiatives within the community such as:
  1. Contributing to Qardan Hasana (Interest-Free Loans) scheme on every Friday
  2. Nazafat - Keeping our masjids, houses, localities, community centres, kabrastan etc. clean. Taking care of overall cleanliness.
  3. Faiz-ul-Mawaid-al-Burhaniya - Which imparts same quality of food to all community members throughout the world.
Syedna Mufaddal Saifuddin has helped the community redefine its own identity in this modern era by making sure that we do not compromise our values but still accepting the new age. Unlike other claimants who want their community to forget values and just follow the world.

Sunday, January 19, 2014

The Greatest Miracle of Syedna Mohammed Burhanuddin - Dawoodi Bohra One Nation

I had been planning to write this article for a long time but now, in the wake of the demise of our Moula - Syedna Mohammed Burhanuddin - it seems more appropriate and relevant.

This is my humble tribute to Syedna Mohammed Burhanuddin (RA) -

The most basic observations to judge a person's ethnicity (country/region of origin) are:-
1. Appearance - Outfit, features etc.
2. Name - usually surname and occasionally the first name
3. Behavior - likes and dislikes, eating habits, etc.
4. Language/Accent.

For example, in India, you can guess if a person belongs to South, North, East or West India by their Appearance, Name, Language spoken or Accent or their Behavioral patterns.

If we take a more global example we can judge a person's place of origin - whether they are African, Latin, Asian etc. based on the same observations.

The Dawoodi Bohra community, though much smaller in number has created an identity of it's own, that is to say, that our appearance, our names, our language/accent, our likes and dislikes and especially eating habits give us a unique place in the world.

You can easily identify an 'apnawala' as we call each other in a crowd of hundreds or sometimes even when we are given a list of names.

And not just amongst ourselves people around the globe who have some knowledge of Dawoodi Bohras or our Dai can identify another Dawoodi Bohra.

Our dress - beard and 'topi' for men and 'rida' for women - have become our symbol. We can proudly say that Dawoodi Bohra has become a nationality of it's own and we are Dawoodi Bohra citizens.

But this great change, this great miracle is the result of the continuous hard work and perseverance of one Man, one Angel - Syedna Mohammed Burhanuddin!!

But why is this the Greatest Miracle? Why is this so important?

The answer to this is simple. Usually, we find it difficult, almost impossible, to change the heart of one individual to accept something they are not accustomed to, but Syedna Mohammed Burhanuddin has changed the hearts of millions to accept this new way of life.

Today we do see professionals going to office with beard and 'topi' or 'rida'. While the rest of the world is trying to gel together, to be indistinguishable, to hide their beliefs behind a modern outlook and moving away from their roots in doing so. We are trying to stand out in the crowd. We accept modernity but with our roots firmly in place. We are projecting ourselves through our beliefs. The world is accepting us now and this change has not taken place over a short period of time, it has taken 50 years of undeterred effort to bring about this change and the reason for this change is Syedna Mohammed Burhanuddin! 

Moula has toiled and struggled so that we can go around the world with our identity in place, so that wherever we are our roots are firm.The world identifies Dawoodi Bohras as a peaceful group of people, they identify us through our Moula.

We saw a 'Sea of White' engulf South Mumbai to bid farewell to our Beloved Moula. These are the fruits being borne by the seeds that were planted by Him.

Let us then pledge that we will carry on these customs, we will announce ourselves to the world, we will walk on the path that our Moula has paved for us and not just paved, paved and adorned with flowers for us.

But we being mere mortals always require a guiding light, a helping hand to make us walk this path. And therefore, we request our 53rd Dai - Syedna Mufaddal Saifuddin to always hold our hand and keep us firm in the path of Syedna Mohammed Burhanuddin.

May Allah ta'ala grant a long, healthy and prosperous life till the day of judgement to our Moula Syedna Mufaddal Saifuddin (TUS).

- Huzefa Mala.

Syedna Mohammed Burhanuddin, Syedna Mohammed Burhanuddin, Syedna Mohammed Burhanuddin!!!

Date: 16th Rabi-ul-Awwal 1435.
Day: Jumoa.

The day started normally, as usual hundreds of things had been planned - related to work, related to Jumoa prayers, related to ta'abudat amals. But everything turned out to be useless. Every plan was a waste. Every moment was going to turn unbearable!

The most common prayer in the heart of every mumin - "Khuda Syedna Mohammed Burhanuddin Moula ni umre-sharif ne qayamat na din lag daraaz ane daraaz karjo!" This dua had to stop! This dua had to be altered! Because our Aqa, our Moula, our Father, our Hope, our Guiding Light, our Dai, our Sultan, our Qibla, our Savior, our Caregiver, our Shade in the Sun, our Teacher, our Protector, our Huzurala had left us to reach the Hazrat of Panjetan Pak (AS), to reach the Hazrat of Imam-uz-Zamaan, to reach the Hazrat of Syedna Taher Safiuddin, to reach Jannat-ul-Firdaus.

It seemed impossible, it seemed like a nightmare but we had to believe it. For as long as most of us mumin have been alive today we have had only one Moula, one Face to look up to, one Hand to ask for Help. How could this be possible!!

It is difficult to find words to express my grief! Grief is a very insignificant word in itself!

The next day our eyes had to witness the painful sight of Janaza of Syedna Mohammed Burhanuddin. Still it was difficult to believe that it was Syedna Mohammed Burhanuddin in that Janaza. These eyes would no longer witness the Noorani Chehra Mubarak of Burhanuddin Moula .

But NO!!

These eyes will witness the Noorani Chehra Mubarak of Burhanuddin Moula! These lips will pray for the long life of Our Moula. These hands will be folded in front of Our Moula, Our Moula Mufaddal Saifuddin (TUS). We do sajadat of shukr to Burhanuddin Moula for the azeem neamat of Moula Mufaddal (TUS), who is giving us the barakat of deedar of Syedna Mohammed Burhanuddin through his Noorani Chehra, who is giving us the neamat of Syedna Mohammed Burhanuddin's bayaan through his Voice, who is NOW - our Aqa.. our Moula.. our Qibla.. our Father.. our Hope.. our Guiding Light.. our Savior.. our Caregiver.. our Shade in the Sun.. our Teacher.. our Protector.. our Sultan.. our Huzurala.. our DAI!!

May Allah ta'ala grant afzalul jaza to our Moula Mohammed Burhanuddin in Jannat-ul-Firdaus, may Allah ta'ala grant a long, healthy and prosperous life till qayamat to his Mansoos and the 53rd Dai-al-Mutlaq Syedna Mufaddal Saifuddin (TUS) and may Allah ta'ala grant each and every mumin present today and born till the day of qayamat the sharaf of Ziyarat of Syedna Mohammed Burhanuddin (RA) and Syedna Taher Saifuddin (RA)!!

Khuda sagla ne ane hamne Sabr ni taakat ata kare.

- Huzefa Mala.

Sunday, September 29, 2013

Friday, August 23, 2013

SharePoint Document Sets - not to be confused with FOLDERS

Document Sets - in my view is a very misunderstood and commonly misused entity in SharePoint.

The general perception about Document Sets is that they are Folders with a Welcome Page, but there is much more to it than just that.

A Document Set is a separate entity while a Folder, more or less, behaves as a location. Therefore, apart from grouping related items together a Document Set can also be treated as an item in a SharePoint Library. Therefore, all operations that are applied to a SharePoint Library item can be applied to a Document Set.

Below is a list of features of Document Sets:
  • A Document Set contains a welcome page which can be used to give more information about what it contains. Web Parts can be added to the welcome page to give a snapshot of what the Document Set will contain.
  • It can contain separate Metadata and Site Columns from the Library in which it is contained. Metadata and Site Columns can be shared by all documents in the Document Set or can be applied to individual documents.
  • By creating Content Types inherited from Document Set, we can define default documents that will be created along with our new Content Type. Suppose, we define a Content Type for Sales Report then we can associate all Sales Reports templates with that Content Type. Each time a new Sales Report Document Set is created, all the templates will be created along with it and users can simply fill in those templates to generate their report.
  • Workflows can be associated with the entire Document Set or individual documents inside the Document Set
  • Versioning can be applied to the Document Set.
  • Specific content types can be made allowable inside a Document Set.
  • Unique permissions can be associated with a Document Set.
Below are a couple of features not available with a Document Set, when compared with a Folder:
  • Document Sets cannot be nested i.e. Document Sets cannot contain Document Sets
  • Document Sets, as the name clearly suggests, cannot be associated with SharePoint Lists.
To enable Document Sets within your site you need to activate the Document Set feature which is available at the site collection level.

Document Sets are not available with SharePoint Foundation 2010.

Below are certain links for further reading:
For limitations of Document Sets refer this link: http://www.sharepointanalysthq.com/2011/09/document-set-limitations-and-considerations-in-sharepoint-2010/

Tuesday, August 13, 2013

Configure LDAP Authentication for your SharePoint 2010 or 2013 site

Recently, I tried configuring LDAP authentication for my SharePoint 2013 application.

Obviously, in case of SharePoint 2013 we need to use Claims based authentication and we need to configure three configuration files:
  • Security Token Service web.config
  • Central Administration web.config
  • The specific web application web.config.
There are many blogs explaining the details of these configurations. Here is an interesting link that explains stuff in detail - http://sharepointchick.com/archive/2010/05/06/configuring-claims-and-forms-based-authentication-for-use-with-an.aspx

However, there is one important task that you need to perform on your LDAP server to ensure that the authentication is successful. You need to give administrative permissions to the following accounts on your LDAP server:
  • Security Token Service application pool account
  • Central Administration application pool account
  • Web application app pool account.
This simple task had me hung up for quite a few hours (or days, I can't really recollect).

The interesting thing here is that SharePoint does not give you the specific error that it cannot access the LDAP directory straight away. It throws in a lot of generic errors such as - User credentials cannot be authenticated, please check user name and password. And somewhere amongst these generic errors is hidden your real error that it cannot access the LDAP server objects for authentication.

Sunday, October 21, 2012

Move/Change SharePoint 2010 Database Server


This, according to me, is a very possible and real -world scenario:

Your client (or your organization, for that matter) is planning to upgrade the databases, or the database architecture/topology and have come up with an entire new set of hardware which will host the databases and you are assigned the task of moving only the SharePoint databases to the new server.

Ordinarily, if this were a .NET application you would simply ask your DBA to backup/restore your databases and make changes to your connection strings in the config file and that's the end of that story. (Please note that I do not claim to be a .NET specialist and I apologize for hurting the sentiments of .NET developers if I have over-simplified the complexity of their task)

But, as I have said time and again "things are not that simple in SharePoint World"!

So, here's what Microsoft have to say about the method of achieving the database move from one server to another for SharePoint: SharePoint 2010 - Move all databases

In simple words, you need to apply an SQL alias to all your SharePoint servers in the farm, so that whenever a request for the "OLD" SharePoint Database server is sent from any SharePoint server it is redirected to the "NEW" Database server. Easier said than done!

To quote one of my colleagues - this is a very "weak" solution because -
  1. The reference of the old database server is never removed
  2. All logs and statistics mention  the old database server name.
To a person who has been newly introduced to the SharePoint farm and is debugging certain issue it is very confusing to figure out that the database server mentioned in the log files is just an alias and the actual database server is different. It could mess up his life and could potentially cause serious mental strain!

The other method is to re-create your farm and re-configure all services with the new database. Ofcourse, you would migrate the content of your Web Applications, residing in Content Databases, to the new server through backup/restores. Here is the link that sheds more light on this method. This is a possible solution if you are dealing with a small farm but if you have a multiple server farm with huge amounts of data residing in SharePoint, which has been crawled by the Search Services and User Profiles running into thousands then re-configuring all services might give you a nightmare.

I am going to concentrate on the former approach of applying aliases in this post. The steps to apply the alias and, therefore, effectively replace your database server are:
  1. Restore databases to the new database server
  2. Remove the SharePoint server from your farm
  3. Apply the SQL alias using cliconfg.exe
  4. Reconnect the SharePoint server to the same farm.
Below these steps are explained in detail, but before you do anything else, please make sure you have the passphrase for your SharePoint farm. The passphrase is required to re-connect the servers to the farm and if (like me) you had not initially setup your farm, there is very high possibility that you do NOT have the passphrase. Refer this post to set/change your farm's passphrase

Step 1 - Restore databases to the new database server -
  • Stop all SharePoint related services on all servers (except the database server) in your farm. Also, stop the IIS service on your WFEs. This is to ensure that no changes will be made to the databases while backup is in progress
  • Backup the SharePoint related databases
  • Restore to the new server
  • Start all the services

Step 2 - Remove SharePoint server from the farm -
  • Logon to your server
  • Run the SharePoint 2010 Products Configuration Wizard
  • Disconnect the server from the farm (please know the passphrase before doing this)
  • Let the wizard complete
Step 3 - Apply the SQL alias to your server -
  • Open command prompt and type cliconfg.exe and the return key
  • An SQL Network Utility will appear that will allow you to enter details of your alias
  • Click on the Alias tab and click Add
  • In the Network Libraries select TCP/IP
  • Write the old database server name in Server Alias and new database server name in Server Name text box.
  • Let the Dynamically determine port check box be selected (and select it if it is not already selected)
  • Click OK
  • Then click Apply and OK
Step 4 - Reconnect the SharePoint Server to the same farm -
  • Again start the SharePoint 2010 Products Configuration Wizard
  • Connect the server to an existing farm
  • And in the database server name provide the name of the OLD database server and select the configuration database name from the dropdown.
  • Enter your passphrase and continue through the next steps of your wizard to reconnect the server to the farm
Note that you will have to repeat steps 2 - 4 for each server in your farm.

Here is what happens next: If there are any configurational issues with any of your SharePoint services which have uptil now been suppressed, they will start surfacing after you have moved the database server. E.g. Search Topology, User Profile Synchronization etc. So, unless you claim to be a perfectionist at maintaining your farm, you will have to do quite alot of cleanup activity after your actual task is over. So, make sure you have taken a sufficient amount of downtime before you start this activity.


Set Passphrase for SharePoint 2010 Farm


The Passphrase, for your SharePoint farm, is required to add a new server to the farm.

If you have forgotten the passphrase then there is no method to retrieve or recover it but you can change it.

The passphrase resides in the SharePoint Configuration database and below are the steps to set/change it:
  1. Start SharePoint 2010 Management Shell from Start --> All Programs --> Microsoft SharePoint 2010 Products --> SharePoint 2010 Management Shell
  2. Write $passp = ConvertTo-SecureString -asPlainText -Force. This will prompt you for a string, which is going to be set as the new passphrase of your farm. The string is converted to SecureString, which is the expected type of the passphrase
  3. Next write Set-SPPassPhrase -PassPhrase $passp -Confirm. It will ask for a confirmation after which your new passphrase will be set.

Monday, October 8, 2012

Convert existing SharePoint Web Application from Classic mode to Claims mode authentication results in all users getting "Access Denied" error or only view rights of the site


Scenario -
I had an existing SharePoint site that I had created with Classic mode authentication (not a good idea!) and due to certain requirements which needed to be implemented in this site I had to convert the site to Claims based authentication. Though I do not "claim" to be an expert in configuring "Claims" authentication I was aware of the simple process of converting Classic mode authentication to Claims mode.

As is true in most cases, I had commitments to meet and converting the site to Claims mode seemed an easy bit and was at the bottom of my priorities. However, after setting up most pieces of my site (which had anonymous access enabled, by the way) when I converted my site to claims mode I was surprised to see that I could no longer access my site with full privileges except with "System Account". Luckily, since I had anonymous access I was able to atleast browse the site with my other admin users and what I saw is that the user names appeared as "i:0#.w|domain\username". With the System Account I checked for the permissions of the site and the permissions were as earlier, nothing had changed. But, still no access.

Solution -
Please take a backup of your web application before running any of these scripts (it is a good idea to take a backup before running any major Powershell script) as it atleast helped me save face.

First of all below is the powershell script to convert classic mode site to claims mode

$webapp = Get-SPWebApplication -Identity "http://serverURL"
$webapp.UseClaimsAuthentication = $true
$webapp.Update()

As mentioned above after running this script access for my users was altered (removed, rather). Here is what you need to do in addition. But make sure you have your backup ready. The script is as follows -

$webapp = Get-SPWebApplication -Identity "http://serverURL"
$webapp.MigrateUsers($true)

Thats it! Seems pretty simple but it took me around 10 hours of searching before I reached this solution (makes me feel pretty dumb if you reached here in 5 minutes).

Caution! Caution! Caution! -
OK! There was a reason I asked you to have a backup before running scripts. This is what happens when you run the above mentioned scripts:

On executing the first script (to enable claims authentication) the SharePoint Content Database is made ready for claims based authentication but the already existing site users, who in my case were windows users, are not "migrated" to be understood by claims authentication. But SharePoint assumes all users to be claim users and renders them so. Therefore, a normal windows user - "Domain\UserName" appears as "i:0#.w|Domain\UserName". Furthermore, it uses the username in this same format to check for its permissions but does not find a matching entry for the user as the database has windows users - "Domain\UserName". So, the site will give you an access denied or, in my case, anonymous access privileges.

Note that the System Account will work since it's "Domain\UserName" is never used and System Account is a keyword used by SharePoint for your application pool identity. Therefore, it remains unaffected.

To overcome this situation we use the second script to "migrate" the users. MigrateUser($true) will convert all user accounts to claims format. After running this script user accounts are converted in the database to claims format, therefore, user names are read correctly by SharePoint, therefore, permissions for users are associated correclty by SharePoint and therefore, the site permissions work correctly.

Something very important to note here is that ideally, MigrateUser($false) should convert the user names back from claims format to the normal format, but it does not do so. This script will throw an exception and no change will be made to the database - so once you are in claim mode you cannot go back. Please refer this post to revert from claim mode to normal mode. Also note that these scripts are running on Web Applications so they will affect all site collections in that web application

Lessons learnt - I feel, that if you are creating a new web application in SharePoint 2010 always use Claims Mode Authentication as it gives you flexibility and you can avoid wasting your time on "migrating" users back and forth. Probably that is the reason why SharePoint 2013 has done away with Classic mode authentication and has only Claims-based Authentication.

Tuesday, July 3, 2012

Spain - First Consecutive Euro Champs

Spain have done it again!

Just a couple of days back Spain created football history by becoming the first team ever to successfully defend their Euro title; and they defended it by the best ever win margin in a Euro final - a 4-0 thrashing of Italy. And the second team to win three major titles in a row - Euro 2008, World Cup 2010, Euro 2012 - after Argentina.

If you go 4 years (and a few months) back Spain had never won the World Cup and had won Euro just once that too way back in 1964. Going by titles this is the best ever Spanish team and possibly the best team of all times.

Though it was an expected result I was hoping for a little more enthusiasm from Italy. Italy's superstar, after the semi-final with Germany - Mario Balotelli, hardly posed a threat to the Spanish defense and the usually awesome Gianluigi Buffon was clueless. In the semi-final against Germany the ball seemed to have a magnetic attraction with Buffon; it hardly missed him to reach the nets, but the final seemed to be the "polar" opposite.

Though, I don't mean to take anything away from the Spanish attack. It looked like the attack of the World Champions that they are but I feel Buffon is an exceptionally talented goal keeper.

But the bottom line is Spain are Euro Champs once again and serious contenders for the World title in 2014.

Well done Spain!

Friday, June 1, 2012

SharePoint on Android/iOS Tablets

The tablet market is expanding by every passing day and honestly, the experience it has created for users is "Amazing". Tablets are here to stay and we have to adapt to this new device as soon as possible.

Being involved with SharePoint and sharing views of many SharePoint professionals, I think we have to start making SharePoint "Tablet-friendly". You would argue that SharePoint being a server-side technology, hosted on a web server can be browsed using the web browsers available in these tablets.That is very correct, but a SharePoint site browsed through a portable device gives very limited capabilities. Customers expect to leverage SharePoint to fully use the tablet experience. That is what will make them fully enjoy SharePoint's power.

There are various applications already available in the stores of Apple and Android powered tablets that can interact seamlessly with SharePoint and give users a rich experience. I have listed some of them below:

  1. Formotus
  2. SharePlus
  3. Mobile Entree
They offer quite different range of capabilities.

Also, you can create your own custom application using the following platforms:
  1. Phone Gap - It is HTML 5 based and uses HTML, JavaScript for application creation
  2. Mono - Makes the .NET libraries available over multiple platforms.

Wednesday, May 30, 2012

Miracle of Syedna Mohammed Burhanuddin (TUS) - 2 - Personal Experience

My experiences might not apear like miracles, but the way these events have occured in my life they are certainly miracles for me. This is what happened:

My family and I had come to know that my wife was pregnant; as with any parent there was a great deal of excitement, tension and preparation going on...

But sadly, our happiness was short lived. We had gone to the doctor for a check up and we came to know that the baby had moved down and was close to being aborted. My wife was advised to be admitted to hospital and we had the following options:
 1. My wife had to undergo an operation to prevent the child from moving further down, or
 2. Abort the child.

The doctor had said that even after the operation my wife would have to be on complete bed rest until the delivery. And all this also did not guarantee that the child will be born safe and chances of abortion were still very high. The greatest risk was that the child might have to be aborted during the operation if something should go wrong.

We did araz of the same in Huzurala (TUS), Moula bestowed benediction and gave raza to undergo operation and not abort the child.

The operation was performed the next day. It went on for around 45 minutes (which appeared to be longer than forever). I was outside the operation theatre for some time but later went for ziyarat of Syedna Taher Saifuddin. No sooner had I stepped out of the roza complex that I got a call from my father-in-law that the operation was successful. I was happy but this was just the first step.

It is difficult for a person to take complete bed rest even when they are suffering from some physical disability, imagine a bed rest for 7 months by choice!

But, it was surely the dua mubarak of Aqa Moula (TUS) that my wife was positive and patient throughout her bed rest. She could only get up from bed when she had to go to the doctor for her check-up.

The doctor had called us 5 weeks after the operation for the first check-up. As scheduled we took an appointment and met with our doctor after 5 weeks. She examined my wife and said that "It is truly a miracle that your baby has survived. I did not expect this. I thought that you will come after 2-3 weeks to abort the baby as there were very minimal chances of survival."

After hearing this we, as well as the doctor, expected that the baby might be born a little premature in the 7th month. We repeatedly did araz in Huzurala (TUS). It was only due to the dua of Aqa Moula (TUS)  that I was gifted with a son. He was born in the 9th month, though he was underweight at birth, but healthy.

I along with my family araz sajadat of shukr in the hazrat of Aqa Moula Mohammed Burhanuddin (TUS) for this very dearest of blessings. And guess what my son's name is - Burhanuddin!

And finally, I thank my wife for having the patience and courage to go through those tough times. She just gave a demonstration of how strong women can be!

Also, I would like to thank Shaikh Shabbir Najmi for doing all our araz.

May Allah ta'ala  grant a long, healthy and prosperous life to Syedna Mohammed Burhanuddin till the end of time. Ameen!

Monday, May 21, 2012

Moving documents from one document library to another maintaining versions - SharePoint 2010

Here is a simple task - Move documents from one library to another in SharePoint 2010 Document Library. Sounds simple! You can use "send to another location", "explorer view" etc. etc. But let me slightly complicate things here -

Move documents from one library to another in SharePoint 2010 maintaining all versions of the document in the new library.

Now, there is an understood pre-condition associated with this task that both libraries should have versioning enabled to the same level (minor or major).

What I found was that, when we use "send to another location" or any other OOB method to transfer the document from one location to another, versions are not maintained. They are simply forgotten. Reason for this is simple - at the new location, even though versioning is enabled, the transferred (moved) document is the very first version. In simple words, versioning is initiated at the new location only after the document is created there.

But as usual this was something I did not expect, because all my client asked is to move documents from location A to B and I very confidently agreed to do it in a few minutes time. And as a P.S. the client added that documents have versions and versions will be required at the new location. I thought - "That should not be a problem??"

Turned out I was wrong. I panicked and the first thing came to my mind was "custom code" and the pain it would cause to write all those lines, build, debug, test; build, debug, test; build, debug, test... you get the point.

But then, a little bit of researching gave me this quick solution -

All you need to do is open both locations (document libraries) in explorer view and cut and paste the files to the new location. Note that -
  1. Copy and paste will not carry your versions,
  2. Both location should have versioning enabled and
  3. Both libraries should have the same template i.e. document library --> document library or form library --> form libary and so on.
Really neat trick and saved a lot of my time. Huh! Can spend some time playing angry birds now!

Monday, May 14, 2012

Miracle of Syedna Mohammed Burhanuddin (TUS) - 1 - Personal Experience

I am a member of the Dawoodi Bohra community.

The following incident happened in July-August 2010 (just before Ramazan 1431) and I am writing it today to araz shukr (offer thanks) in the hazrat (holy presence) of Syedna Mohammed Burhanuddin (TUS):

I am a software engineer, residing in Mumbai, and during the period of January - August of 2010 I was working for a prestigious multi-national IT company (name withheld for obvious reasons). They had delegated me to their manufacturing unit  in Mumbai to provide support for the manufacturing unit's software division.

I was not very comfortable in this position and was trying to convince my managers for quite some time to bring  me back to our main IT office. Reasons for this were:

  1. The culture of the manufacturing department was not very helpful for gaining IT expertise and the software division was a very neglected division.
  2. The work was endless and laborious and I did not find any understanding from my managers at the manufacturing unit.
  3. And, the most important reason was that they did not let me offer namaz (in their premise or outside) mainly during zohar-asr (afternoon) time.
I had experience prior to joining this multi-national company but nowhere had I faced opposition for offering namaz. This was the first such instance and I was pretty shocked to see their blunt attitude. It should also be noted that while I was at my main IT office there was no such opposition and there were a handful of people praying regularly at a secluded place.

Initially when I was warned not to pray namaz during office hours I ignored it; it used to take me hardly 5-7 minutes to offer prayers and I thought I will sneak out during lunch hours and no one will come to know. I had tried my best not to come in anyone's way and quietly follow my religion. But later they pressurized me by complaining to my IT office managers, who equally supported them.

I argued with my managers that in our head office people do offer namaz and I am just taking 5 minutes of lunch time  to perform my religious duties but the blankly opposed. Their argument was that office time is for office only and no personal work can be done at that time. But, my office time was also never ending and honestly there was much more office time wasted by people in chatting, tea and snacks and other such activities.

And all this happened just before the month of Ramazan. I was distressed, I just remembered the words of Syedna Mohammed Burhanuddin and how He stressed on the importance of namaz and I decided to quit my job.

On July 21, 2010 I resigned from my job. I was very worried as my family's financial position was not very great and I was about to get married in December that same year. But my entire family, including my now wife and in-laws supported my decision. I started giving interviews to any company that came my way, irrespective of its status and the position they were giving me. 

I had a 3 month notice period and I thought may be I will find something by then. But I did not know that my fortune was about to turn.

I got a chance to visit Burhanpur, Dargah-e-Hakimi and I was at the gates of Hakimuddin Moula's dargah when I got a call for an interview in Pune. I had not planned to leave Mumbai, and I had got a call from the same company earlier but I had ignored it since I wanted to stay in Mumbai. But right now I was going for everything, so I agreed to attend the interview in Pune.

I went from Burhanpur directly to Pune and attended the interview, I got selected. And astonishingly got twice the salary of my current company. So, I went from Burhanpur to my home with a job in hand. "Hakimuddin moula koi na khaali haath pacha nathi walta."

The first thing I sought after that was raza and dua mubarak of Burhanuddin Moula (TUS) to do a job in this company in Pune. I did not have many contacts and did not know how could I get my arzi done quickly as I had to reply back to the company for acceptance of the offer. But Burhanuddin Moula had everything planned for me.

My wife's friend had very good contact in Huzurala (TUS) and he got our arzi done. Within 1 day I got raza from Moula (TUS) to take the job if I find it suitable. So, in fifteen days time I had gone from no job to double salaried job. But this was not all, Moula (TUS) had one final surprise for me.

My company was based in Pune, but they had an open position at one of their clients in Mumbai, that too close to my home. Instead of serving 3 months notice I quit the job in 40 days. And, yes  my new managers did not have any problems with me offering namaz. In fact, they used to see to it that I did not have any problems during that period.

All this happened so fast that it was difficult to believe for me. More than just a co-incidence of events this seemed a planned sequence of events in my life, planned by my Moula (TUS).

One last aspect I want to point out here is that there was a masjid tameer fund scheme going on in our tanzeem committee and our aamil saheb had greatly enforced everyone to pay their masjid tameer dues (as any aamil saheb would do). But I was deeply touched by his words. He used to say that - "Khuda nu ghar aabaad karso to tamaro pan ghar aabaad thase".  I had paid our masjid tameer dues as soon as I had collected enough money and co-incidently that was in the same month of July 2010. Aamil saheb was right!

It is true that Moula (TUS) apna har amal par nazar rakhe chhe. Ane aap Moula ne saccha dil si yaad karo to Moula madad par aawe chhe.

I offer my humblest and most sincere thanks to Allah ta'ala, Hakimuddin Moula and Syedna Mohammed Burhanuddin Aqa (TUS). May Allah grant our beloved moula a long, prosperous and healthy life till the day of judgement. Ameen!

The Dawoodi Bohra community

I am a member of the Dawoodi Bohra community and in this blog I would like to highlight certain points about the community for those interested in knowing more about us:

  • Dawoodi Bohras are a section of the Shiite-Ismaili-Mustaali sect, who believe in the progeny of the Prophet Mohammed (SAW), the Fatimid Imams as the highest authority in all matters. In the absence of the Imams (seclusion) the Dai-al -Mutlaq are the representative of the Imam of the time and have the authority of the Imam. Our current Dai-al-Mutlaq, the 53rd in the office is Syedna Mufaddal Saifuddin (TUS), whom we refer to as Aqa Moula.
  • Dawoodi Bohras are a trading community with a large number of its members involved in business - ranging from general stores to high end industry machinery.
  • We have a hierarchical governance system, where in local jamaats are established for governance of everyday affairs of the members. These jamaats are collectively under a jamiat (group of jamaats) which finally report to Syedna Mufaddal Saifuddin (TUS)'s office.
  • We are a close knit community and have frequent religious gatherings in our localities, which binds all members together. Most Dawoodi Bohras are easily identified - men wearing topi and beard and women wearing ridas (similar to a burqa but multi-coloured).
  • Dawoodi Bohras are a peace-loving community having a global presence. A major part of the population resides in India, but  a large number of Dawoodi Bohras also reside in Africa, USA, UK and Pakistan.
  • We have an annual 9-day gathering during Ashara Mubaraka, to commemorate the martyrdom of Imam Hussain (A.S.), grandson of Prophet Mohammed (SAW). Our religious head, Syedna Mufaddal Saifuddin (TUS) delivers religious sermons during this period. This event is attended by a large number of community members every year, at the location specified by Syedna Mufaddal Saifuddin (TUS). Though members can also attend sermons at their local jamaat, which are delivered by people appointed by Syedna Saheb (TUS).
This is a very brief overview of our community. Readers are free to offer comments and suggestions for anything I might have missed or misinterpreted. And finally, I end this blog with a prayer to the Almighty to offer a long, prosperous and healthy life to our Aqa Moula Syedna Mufaddal Saifuddin till the day of judgement. Ameen!

Thursday, May 10, 2012

"I cannot delete this column from my list??" - Well that must be a SharePoint 2010 Peristent column

If  you are viewing this blog post I assume you have not had a very good day at work today! Here's a look at what happened to me -

I recently ran into a problem where one of my users added a site column called "Target Folder" to their SharePoint list and later realized that that column was not required. So the user wanted to delete the "Target Folder" column. That is the most basic SharePoint task that is there to be done and so I wondered that why is this user coming to me for something so trivial.

Alas! Everything in SharePoint is not what it seems. I went to the list settings clicked on the column and I could not find the delete button in fact I could not find any means to edit that column. What happened here? I checked some other columns (Had my farm gone crazy?) No! Every other column in that list (or for that matter in the site) seemed absolutely fine.

After a few hours of digging here and there I turned to Master Google and I was enlightened!

There are a set of site columns which are Persistent site columns and once added to a list these columns cannot be modified or deleted (through the SharePoint UI). Also, if you add these site columns to a custom site content type you will not be able to delete the site content type as well. On attempting to delete the site content type you will get an error stating - "The content type is in use and cannot be deleted" even though you have not used the content type anywhere.

Here is a list of site columns which are persistent:
  1. Active
  2. Aliases
  3. Article Date
  4. Byline
  5. Contact
  6. Contact E-Mail Address
  7. Contact Name
  8. Contact Picture
  9. Custom Router
  10. Image Caption
  11. Page Content
  12. Page Icon
  13. Page Image
  14. Priority
  15. Properties used in Conditions
  16. Property for Automatic Folder Creation
  17. Rollup Image
  18. Route To External Location
  19. Rule Name
  20. Scheduling End Date
  21. Scheduling Start Date
  22. Submission Content Type
  23. Summary Links
  24. Summary Links 2
  25. Target Audiences
  26. Target Folder
  27. Target Library
  28. Target Path
Be very sure before adding these columns to your list or content type.

To delete these site columns from your list you will need to do so by using PowerShell commands as follows:

$web = Get-SPWeb (Your site URL)
$list = $web.Lists[(Your List Name)]
$field = $list.Fields[(Your Column Name)]
$field.AllowDeletion = “true”
$field.Sealed = “false”
$field.Delete()
$list.Update()
$web.Dispose()

And.. I hope the rest of your day (if left) is nice!

 - Huzefa Mala

I am Back... to Blogging

I am back to blogging and hope I last longer this time.

Many things have changed in life since my last stint with blogging.

So, lets talk professional here : I have started with SharePoint 2010 and it's great (Wait! But that's old news. SharePoint 2010 has been here for almost 2 years now!) Yeah, I know, but I came back to blogging after a long time.

Though I have a huge number of things to explore yet I am still very happy with the improvements provided and honestly I don't know how to work without the ribbon now.

So, planning to keep a record of all my struggles with SharePoint 2010 here.

Saturday, July 10, 2010

There's a BUG! There's a BUG!! There's a BUG in the Discussion Board

This is something fishy!
Recently I was working with discussion boards in MOSS 2007. All seemed well. I had to create a simple discussion board with approval. "No big deal!", "That's non-IT stuff if you use SharePoint!"....... If this is what you feel you are in for a BIG surprise........ (just like I was :-) )
So I went ahead and created a Discussion Board, went into versioning settings, selected "Require Content Approval" and did a few test runs. Everything seemed to be working fine until I tested with different users.
Problem: User X writes a new post. This post goes for approval to User A. Until User A approves the post this post will not be visible to all the users. So the obvious thing to do is for User A to approve which he does but as soon as User A approves the post, User A's name starts appearing everywhere in the post viz-a-viz in the quoted text section, the picture of the person who started the thread. And poor User X who actally started the post is lost.
Reason: Now, when User A approves the post, he/she becomes the user to last update the post i.e. the modified by column of the post is updated to User A. And it so happens that in the flat or threaded view of a discussion the name of the user who last modified the post is displayed. But in our "content approval" case it sends a very wrong message. If you go back to the subject view to see the entire list of threads you see that the User X is still the creator of the post.
Now what: I had posted a question on MSDN forums, this is the link. I was not too satisfied with the answer. It stated to write an event receiver to update the modified by column of the post back to the created by column..

I wish there was a better way....

Tuesday, June 15, 2010

Copying Multipl User Field from one SharePoint List to another

So once again I landed up in trouble because of the Person or Group field (Multiple Selection). Refer earlier post.

Now, this time what I needed to do is I simply needed to copy a Person or Group field with multiple selection enabled to another such column in another list, through an Event Receiver.
You might think - "Why is he writing an event receiver?? Why can't he just use a simple SPD Workflow??"

But as usual.......... there is a catch!!

I have created a SharePoint site with Forms Based Authentication (FBA). My users no longer come from the Active Directory, they come from an SQL Membership API database.
And.... SPD Workflows run under the OWSTIMER.EXE service not the w3wp.exe service.

(For general information the w3wp service is created by the IIS and is used to handle web requests coming to a web server. The OWSTIMER service is created by the Windows SharePoint Timer Service and is used to execute scheduled jobs of SharePoint.)
So, since the SPD Workflows run under a different service, they cannot read the web.config placed under the IIS Service, therefore, they cannot read the Membership API database settings, therefore, SPD Workflows cannot identify FBA users.

So, I write a little bit of code to perform the task at hand i.e. copying multiple users from one column to another (using event receiver).
But again..... things are not as simple as you think. I write this line of code:

oDestinationList["MultiUser"] = oSourceList["MultiUser"];
here

  • DestinationList is Destination List object
  • SourceList is Source List object, and
  • MultiUser is the name of the field

but this simple line of code doesnt work. It states that the source and destination objects are not of the same type and cannot copy code!!!! Why????? I have no clue!

On googling I found a long procedure for copying multiple user fields: Create a SPFieldUserValueCollection object and append user names in this object etc.etc..... thats too much work...

So, on doing a little bit of research I found that there IS a simpler way of achieving this. Here's the code:

oDestinationList["MultiUser"] = Convert.ToString(oSourceList["MultiUser"]);

and it worked!!!! Hurray!!!!

Really SharePoint is funny!! :)

Huzefa Mala.

Monday, June 14, 2010

Send E-Mails to SharePoint Multiple User Field SPD Workflow

I faced a recent problem whilst designing declarative workflows in SPD 2007:
It sounds pretty simple - I needed to send mails using the Workflow to users who were stored in a Person or Group field.
You might think - "What's the big deal in that??".... But here's the catch. The Person or Group field I am referring to allowed multiple user selection.
==Bam==
All hell broke loose. How was this possible??? The Person or Group field just doesn't show up in the Workflow lookup! What do I do? Will I need to write an event receiver? Ohh!!! I didn't want to write code here? It seemed so simple. But wait..... lets try to fool SharePoint.
OK so first I do not allow multiple user selection in my Person or Group field. (You might think what about the already existing records? Data loss! Ya I know.... you might have to do this the hard way - Create a template for your list including content, recreate your list using the template you just created and after finishing all the steps mentioned here add all the entries again..... I told you this was the hard way!)
OK continuing with fooling sharepoint...... now, on preventing multiple user entries my Person or Group field starts appearing in the Workflow lookup for sending mails.
I complete my workflow steps, go back to my list and again allow multiple user selection in my Person or Grop field.
Now lets check whether the workflow is giving any errors.....
No......... no errors! Congratulations! SharePoint has been fooled! (Now can re enter your entries as I had mentioned above)
Happy SharePointing! :)