Shahzad's Blogs
Tuesday, June 19, 2012
SharePoint Upload Multiple Files Control
Sunday, November 22, 2009
How to increase the size of vmware hard disk (.vmdk)
I was preparing 64-bit VM for my (SharePoint 2010 beta) development environment using VMWare, with the capacity of hard disk 20GB. But in order to install everything required for SharePoint 2010 beta 20GB was not sufficient, so I planned to increase the size of hard disk. I thought it would be very easy to increase the size of hard disk through management web console of VMWare but I could not find any option to increase the size of hard disk. After searching on the internet I found following some blogs/articles on same issue but nothing could work for me as it is mentioned in following links:
http://www.novell.com/coolsolutions/tip/15344/html
http://consultingblogs.emc.com/kalpeshprajapati/archive/2007/07/24/How-to-Extend-virtual-Hard-Disk-_2008_-WMWARE_2900_.aspx
When I ran command:
c:\program files\VMWare\VMWare Server>vmware-vdiskmanager.exe -x 30Gb "filepath\filename.vmdk"
I got error:
FILE: FileIO_Lock on 'filepath\filename.vmdk' failed:Lock timed out
Failed to open the disk 'filepath\filename.vmdk': The file is already in use (0x400800000000f).
So in order to increase the size of vmware hard disk, I have performed following steps
1- Make sure VM is stop
2- Remove the hard disk from VM
3- Increase the size of hard disk using aforementioned command
4- Attach the existing hard disk with VM
5- Turn on the VM
6- VM was up and running successfully with extended size 40 Gb of hard disk
7- Turned on the VM
8- Go to command prompt and type diskpart
9- then type list disk
10- then type list volume, which shows all the drives with volume numbers and other information. In order to increase the size of respective disk, volume is required to be selected
11- Type select volume=
12- After selecting the volume, type extend
13- Done
Hoping this will help someone else time while increase the size of VMWare hard disk.
Following are the steps which I followed in order to increase the size of hard disk
Monday, November 16, 2009
SharePoint Designer Workflow and InfoPath
Assign approver dynamically
I was developing a SharePoint Designer Workflow, in which approver of the Workflow was selected dynamically while reading from a field (exposed from InfoPath Form - People Picker) of SharePoint List, the problem I was facing that field was returning nothing to me even InfoPath Form had contained data in it.
After digging more into this, I figured it out SharePoint Designer Workflow was not able to fetch the value from the field in Step-1 (SharePoint Designer Workflow works in steps and within each step activities can be performed based on the conditions, if any), so when I moved the logic to assign the approver on the fly in step-2, it started working.
Set Infopath form field within the workflow
Another challenge I faced while working on SharePoint Designer Workflow to set the value of InfoPath field within the workflow. As there is no OOTB activity which allows setting the Infopath form field but after researching a bit I found a utility on the CodePlex (SharePoint Open Source Community), which adds new activities in SharePoint Designer Workflow related to Infopath and one of the activity is used to set the value of InfoPath field. In order to read more, use this link Useful Sharepoint Designer Custom Workflow Activities
Thursday, September 17, 2009
Custom Content Type, Visible on New Button
http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/13333670-d1ea-41ec-8ebc-4ad9ecb04927
But my custom content type was not set as "Visible on New Button", after that I created a new form library and tried to run the same code which I was using before and it worked for newly created form library.
I started comparing the difference between 2 form libraries because same code was working for one form library but not working for other one, after digging into further I realized whenever you change the order of content type through UI while using the "Change new button order and default content type" option under the settings of form library, code does not work.
So consequently I can say in order to code get working don't change the form library content type order through UI, there can be any other reason for which code was not working but I could find only this reason, it may help someone in future.
Wednesday, September 9, 2009
Top Row / Custom Heading in CQWP
Open ItemStyle.xslt in SharePoint Designer and write down the following code withing your template
Thursday, August 20, 2009
Report Viewer Webpart Error
System.Security.SecurityException: Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.
After digging into this error I figured out that sharepoint site is running under application pool using "Network Service" account.
In order to resolve aforementioned issue, I did the following things
1- Go to Central Admin --> Operations
2- Click "Service Accounts" under (Security Configuration) and do the following
After specifying domain account credentials it solved the issue.
Hoping this will save someone time in future.
Wednesday, August 5, 2009
FBA Users, Open Files in Client's Program/Tools
Following are the different behaviour for different files
Word Document: Microsoft Word Application run but does not display any document
Excel Document:
.WMV File:
After searching on the internet I found the following forum which helped me:
Assume your client is a vista machine. If you run your IE in protected mode (normally it is), then you need to add your server as trusted location. Otherwise you need to run your IE in administrative mode. (right click "run as administrator")
Then when you login in IE you need to check "Sign me in automatically", which will persist your credential.
http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/0811935c-c69a-4eb4-b319-63cc139ac727
In order to enforce (to enable the "Sign me in automatically" option), I updated login.aspx: select "Sign me in automatically" option by default and hide that option so that user no need to select that option.
Hope this will save time for someone.