SharePoint world of ECM and Information Management

May 2009 - Posts

SharePoint Tip #34. Do you know “how to get the list of check-out files"?!

SharePoint provides OOTB support for document versioning, allowing user to check-in/check-out files, and keep history of changed documents. But unfortunately, versioning system doesn't provide inbuilt method to find these all check-out items made by users.

For some administrative task and farm maintenance it's recommended to have all files to be check-in before making changes. And this task became daunting task for administrators, because you need to check all site collection and list collections manually via SharePoint interface , to check-in user files.

The way to get the list of all check-out files across specific site is to use the following SQL script for SharePoint AdminContent DB

   1: SELECT     tp_DirName, 'http://SiteName/' + tp_DirName AS Expr1, tp_LeafName, 
   2:                       CASE WHEN AllUserData.tp_ContentType = 'Item' THEN 'http://SiteName/' + AllUserData.tp_DirName + '/DispForm.aspx?ID=' + AllUserData.tp_LeafName ELSE 'http://SiteName/'
   3:                        + AllUserData.tp_DirName + '/' + AllUserData.tp_LeafName END AS Link, tp_ContentType, nvarchar1, nvarchar2, tp_ModerationStatus, tp_DeleteTransactionId, 
   4:                       tp_IsCurrent
   5: FROM         AllUserData AS AllUserData
   6: WHERE     (tp_ModerationStatus = 2) AND (tp_DeleteTransactionId = 0x0) AND (tp_IsCurrent = 1)
   7: ORDER BY tp_DirName, tp_LeafName

Source

Have anything to add?! Send your tips to be published via this form.

ASP.NET 4.0 Beta1 - What’s new in System.Web.dll. Assembly outlook [whitepaper]
Introduction

This guideline provides detailed overview of System.Web assembly and the new classes and methods in ASP.NET 4.0, which were released with Visual Studio 2010 Beta1.

Document is subject to change – we are trying to find detailed information about all new stuff and update description column. Send us your comments and suggestion via this online form.

Description

ASP.NET 4.0 introduces several changes to the web assemblies and also merges several dlls that existed in .NET 2.0 - 3.5 SP1. For example, new features from ASP.NET 3.5 System.Web.Abstractions.dll and System.Web.Routing.dll are merged with System.Web.dll, under System.Web namespace.

Changes

Beta1 of ASP.NET 4.0 introduced 27 new classes/interfaces/enums and 22 modifications of the existing ASP.NET 3.5 SP1 functionality.

Take into account, that Beta1 doesn’t provide the complete list of the new features – they can add new stuff or remove existed one prior to the final release.

The latest document version is available there http://tinyurl.com/qr583j (PDF file)

Posted: Wed, May 20 2009 18:57 by Michael | with no comments
Filed under: ,
SharePoint Tip #33. Do you know “why drag-and-drop might be disabled in Explorer View"?!

Historically, SharePoint 2007 provides a nice feature called Explorer View (came from 2003 version) that simplifies document management - like upload, delete, and copy items across different Document library, using drag-and-drop feature.

There is a document, called “Understanding and Troubleshooting the SharePoint Explorer View” that describes the most common issues of why Explorer View might not work correctly. Unfortunately, not all scenarios are covered there.

One of the issues is that you might find drag-and-drop disabled in Explorer View – you just can’t move files across. A bit nasty issue, because Ctrl-C/V still works :)

The solution is to check that you have sufficient permissions for the Temporary Internet Files folder for the BUILTIN\Network Service account. This account must have read and write access to this folder to successfully complete a drag-and-drop operation.

Have anything to add?! Send your tips to be published via this form.

SharePoint Templates for CodeSmith tool

Are you a big fun of CodeSmith tool?! If yes, then you will find the blog post from Waldek Mastykarz very attractive, because we is offering a set of CodeSmith templates to automate some coding stuff for SharePoint.

The following templates are available for download:

  • Generates the ContentTypeBinding element for the given Content Type and List
  • Generates Page Layout for the given Content Type
  • Generates wrapper class for the given Content Type so that you can reference all fields from that Content Type using code with intellisense instead of fiield names
  • Generates ElementFile element for every file in the given directory and its subdirectories. Extremely useful for Features like branding where you have to provision many different files using a Feature
  • Generates contents of a Feature Element Manifest (commonly named as Elements.xml or ProvisionedFiles.xml).

Really good stuff, because CodeSmith community didn’t provide any SharePoint templates before

SharePoint Tip #32. Do you know “which identity is used when you deploy WorkFlow from Visual Studio and SharePoint Designer”?

SharePoint provides you two approaches to design and deploy WorkFlows - via SharePoint Designer(SPD) and using Visual Studio. But you should be aware that deployment of WorkFlows has some differences in the security model that might cause you permissions issues.

SharePoint has its own security model to resolve the user's windows identity for all activities. It uses either IIS application pool user or the WSS Timer user for scheduled stimulations. Such behavior is the same for both Visual Studio and SharePoint Designer workflows, when actual windows identity doesn't matter.

There are two differences in the resolving SPUser name, when you deploy WF from Visual Studio and SharePoint Designer:
  1. Visual Studio developed Workflows are deployed at the server level, run under the System Account. They do not require any permissions by the user/initiator of the workflow.Also these workflows are strong named and placed in the GAC. The actual SPUser user name come from SPWorkflowActivationProperties, which is System Account.
  2. SharePoint Designer developed workflows (or usually called ‘Declarative’ workflows) have only the permissions that the initiator has. Any actions that the workflow needs to perform will inherit the permissions of the initiator and NOT the System account. The SPUser get from the WorkflowContext.Site object, that impersonated to the workflow's author, the user who started the workflow.

Sources: 1, 2

 

Have anything to add?! Send your tips to be published via this form.