Monday, July 1, 2013

Internet Information Services is not installed

I found this solution from the web. Run the following statements in command prompt

REF:  http://sharepointlearnings.blogspot.com/2009/12/iis-not-installed-error-when-trying-to.html

start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;
start /w pkgmgr /iu:IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;
start /w pkgmgr /iu:IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;
start /w pkgmgr /iu:IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;
start /w pkgmgr /iu:IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;
start /w pkgmgr /iu:IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;
start /w pkgmgr /iu:IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;
start /w pkgmgr /iu:IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;
start /w pkgmgr /iu:IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;
start /w pkgmgr /iu:WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;
start /w pkgmgr /iu:WCF-NonHTTP-Activation

Wednesday, May 15, 2013

Workflow status columns not showing up in ListView.

This is what I found so far on the web. 

"This happens because the list can only show a certain number of each type of column and those status columns get cut off when you start adding lookup columns or reference columns and others."

Wednesday, April 3, 2013

How to replace underlying DLL for a custom field

Stay Tuned!

There are three component for a deployment of a field


  1. Put your .ascx @ rootdir:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES
  2. Replace your xml file with the newly created dll @ rootdir:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML
  3. Put your dll in the GAC @ rootdir:\WINDOWS\assembly  

SharePoint Large Lists and lookup column filters

The solution is to created a number field and create a workflow to copy over.

sharepoint 2010 lockManager: Error during locking Web. The Web is locked.

If you try to delete parent item of a child item, from child item's ItemDeleting Event receiver  you start hitting the performance and get the following error:

sharepoint 2010 lockManager: Error during locking Web. The Web is locked.

This scenario occurs if you have Enforce relationship behavior enabled in lookup column of the item getting deleted.

Solution

  • Either turn off the 
  • ItemDeleting  to ItemDeleted.

Friday, February 22, 2013

SharePoint 2010 Linked Data Source item link field

For Direct Page:

<a href="{@FileDirRef}/DispForm.aspx?ID={@ID}" ONCLICK="GoToLink(this);return false;"><xsl:value-of select="@Title" /></a>


For Popup:


<a href="javascript:OpenPopUpPage('{@FileDirRef}/DispForm.aspx?ID={@ID}');"><xsl:value-of select="@Title"/></a>

Monday, February 18, 2013

How to cancel all existing Work Flows on an item

 // Terminate all existing In-Progress workflows.
 foreach (SPWorkflow workflow in item.Workflows)
 {
   SPWorkflowManager.CancelWorkflow(workflow);
 }

Thursday, February 14, 2013

SharePoint 2010 Workflow cannot compare multiple Person filed

Please note that if the person field is only single user field. The comparison seems to be working. If you want you can write a custom activity to do that.

Thursday, February 7, 2013

how to turn on developer dashboard



Using STSADM

Open a command window to the %ProgramFiles%\Common Files\Microsoft Shared Debug\Web Server Extensions\14\BIN directory and enter one of the following commands, depending on the desired display mode.



Mode
Command
On
stsadm -o setproperty -pn developer-dashboard -pv on
OnDemand
stsadm -o setproperty -pn developer-dashboard -pv ondemand



REF:
http://msdn.microsoft.com/en-us/library/ff512745(v=office.14).aspx

Tuesday, February 5, 2013

How to open SharePoint Page in WebPart Maintenance Mode

Maintenance page can be opened by adding the following query string to the page URL

?contents=1


Wednesday, January 16, 2013

How to move custom List Item to a folder within the list




  •  $item = $List.GetItemById(1)
  • $file = $web.GetFile($item.Url)
  • $file.MoveTo($item.ParentList.RootFolder.Url + "/Folder/" + $item.ID +"_.000")

Here is my script sequence. 

PS N:\> $item = $List.GetItemById(5)
PS N:\> $item.ResetRoleInheritance()
PS N:\> $file = $web.GetFile($item.Url)
PS N:\> $file.MoveTo($item.ParentList.RootFolder.Url + "/XXFOLDER/" + $item.ID +"_.000")
PS N:\> $item = $List.GetItemById(6)
PS N:\> $item.ResetRoleInheritance()
PS N:\> $file = $web.GetFile($item.Url)
PS N:\> $file.MoveTo($item.ParentList.RootFolder.Url + "/XXFOLDER/" + $item.ID +"_.000")
PS N:\>

Monday, January 14, 2013

Workflow not running when item updated from event receiver.



I finally found the post to solve my problem of having to run workflow from SPItem.Update()

"

workflow's and event handlers run on a different thread than the main thread. You just cannot create another Console/Windows Application and have it trigger the workflow and just quit.
Quitting the application before the asyc worker threads finish their work, causes those threads to simply abort. In case of workflow, it would seem as workflow never fired !!
So what is the fix here? Use the following line of code
SPSite.WorkflowManager.Dispose();

after updating the item. So effectively the overall code becomes:
using(SPSite site = new SPSite(url))
{
    using(SPWeb web = site.OpenWeb())
    {
        SPList list = web.GetList(url);

        SPListItem item = list.Items[1];
        item[updateField] = DateTime.Now.ToLongDateString();
        item.Update();
        site.WorkflowManager.Dispose();
    }
}
Now when I ran the console application, as expected the item updates and the workflow is triggered 

"
Source: http://blogs.msdn.com/b/malag/archive/2008/07/11/splistitem-update-not-starting-workflow.aspx

Thursday, January 10, 2013

How to move list items between SharePoint lists

One of the ways for simple list items is as follows. 

  • Go the folloing link
    • (http://<Sharepoint Sites>/_Layouts/sitemanager.aspx) 
  • Select the items you wish to copy
  • Select the Destination list
  • Done. 

Tuesday, January 8, 2013

Workflow to move a document to a folder within the same Document Library/List

  • Create Workflow 
  • Update the current Item 
  • Set Path and Name field to desired [folder Name]/Current Item Name
  • Save
  • Publish
  • Done