Tuesday, January 18, 2011

MOSS 2007 features

Moss 2007 features


This post will be of helpful to anyone who plans, builds, deploys, or manages business solutions using Office SharePoint Server 2007.

The following are the features of Office SharePoint Server 2007:
Ø       Portal
Ø       Search
Ø       Content Management
Ø       Business Processes
Ø       Business Intelligence

Portal

Portal components in Microsoft Office SharePoint Server 2007 assist you in designing, deploying, and managing enterprise intranet portal sites, corporate Internet presence Web sites, and divisional portal sites.
The portal makes it easy to connect to people that have the right skills, knowledge, and project experience within the organization. Office SharePoint Server 2007 simplifies the way in which people work together.

Content Management


The new and enhanced content management features in Office SharePoint Server 2007 address three areas:

Document Management

With the new document management components of Microsoft Office SharePoint Server 2007, SharePoint Products and Technologies no longer simply provide a platform for document collaboration. Office SharePoint Server 2007 becomes a full-featured solution for managing business documents.

Document Information Panel Makes editing document properties an integral part of the 2007 Microsoft Office system document authoring experience. Encourages users to enter and update properties associated with each type of business document.

Records Management

Every organization, whether privately held, publicly traded, or not-for-profit, needs a disciplined approach to record keeping. Proper records management is vital to an organization’s knowledge management, legal defense, and regulatory compliance. Microsoft Office SharePoint Server 2007 introduces features for creating and supporting formal records management capabilities in your organization
Records management is the process of collecting, managing, and disposing of corporate records (information deemed important for the history, knowledge, or legal defense of a company) in a consistent and uniform manner based on the company's policies. These policies are shaped by the work of the organization, its legal risks, and the laws and regulations that govern it.

Web Content Management

Microsoft Office SharePoint Server 2007 completely integrates Microsoft Content Management Server 2002 functionality and provides significantly enhanced Web content management functionality.


Search

The search component of Office SharePoint Server 2007 is significantly enhanced to provide a consistent and familiar search experience, increased relevance of search results, functions to search for people and expertise, ability to index and search data in line-of-business (LOB) applications, and improved manageability and extensibility.

Business Process

InfoPath Forms Services, either as part of Office SharePoint Server 2007 or Microsoft Office Forms Server 2007, helps organizations streamline forms-driven business processes with easy-to-use, intelligent, XML-based electronic forms that integrate smoothly with existing systems. This security-enhanced, client/server platform provides rapid-solution creation and deployment, centralizes form management and maintenance, and helps to extend business processes to customers, partners, and suppliers.

Business intelligence

Microsoft Office SharePoint Server 2007 helps organizations provide business intelligence (BI) capabilities to every employee, for sharing, control, and reuse of business information to make better business decisions. The BI features in Office SharePoint Server 2007 provide the following:
  • Web and programmatic access to Office Excel workbooks through Excel Services
  • Programmatic reuse of critical line-of-business (LOB) data through the Business Data Catalog
  • Easy development of Web-based BI dashboards that can incorporate rich, data-bound key performance indicators (KPIs), Web Parts, and workbooks that can be hosted within the new Report Center site template.

Sunday, January 9, 2011

Moss 2007 Workflow with InfoPath “Specified Form Cannot be found" Issue RESOLUTION

Following are the steps to resolve “Specified Form Cannot be found" Issue:

 

Step 1 Feature Definition (Feature.xml)


<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="MyCustom Request Center Workflows"
Description=""
Id="cc670ffe-fb03-4eb2-8f74-0a70be5cf102"
ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"
Scope="Site">
  <Properties>
    <Property Key="GloballyAvailable" Value="true" />
    <Property Key="RegisterForms" Value="HardwareRequest\*.xsn" />
  </Properties>
  <ElementManifests>
    <ElementFile Location="HardwareRequest\ApproverTaskForm.xsn" />
    <ElementManifest Location="Elements.xml" />
    <ElementManifest Location="RequestPreProcessEvntRcvr\Elements.xml" />
  </ElementManifests>
</Feature>

Register the Form

 

The feature definition file for the workflow is very similar to any other SharePoint feature definition.  The big key here when using InfoPath for your workflow forms is to make sure that you declare the forms you wish to register for use with your workflow.  This is done by adding the following properties to the manifest of the feature:

<Property Key="GloballyAvailable" Value="true" />
<Property Key="RegisterForms" Value="HardwareRequest\*.xsn" />

Note above that the path used in the “Value” of the “RegisterForms” property is a relative path to the feature.  This means that your forms need to deployed in the same feature folder as the workflow.  When using the VS2010 Workflow Template a folder is created in the project with the name of your workflow.  you will want to copy your InfoPath form to this folder.  If you have multiple forms or like to keep things organized then you can create a subfolder at this location and place your form there,  just make note of the RELATIVE path. SharePoint OOB has a folder called “Forms” which stores the IP Forms for all the OOB workflows.
The other thing to point out here is that you MUST use the following feature reciever for your workflow to register correctly:

ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"

NOTE:The above assembly are OOB the box with SharePoint and your form will not display correctly if you do not use this feature receiver.  Without this I was getting “Specified form cannot be found!”  when I tried to perform a workflow action which used my form!

Step 2 Workflow Definition File

 

  <Workflow
Name="Hardware Request"
Description="This workflow will send the request through the hardware request process.  This workflow will be for hardware requests only!"
Id="f25f4deb-4be2-4b14-bbee-f4db163cd7bc"
CodeBesideClass="MyCustom.RC.WF.HardwareRequest.HardwareRequest"
CodeBesideAssembly="$assemblyname$"
Title="Hardware Request"
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
ModificationUrl="_layouts/ModWrkflIP.aspx">
    <Categories/>
    <MetaData>
      <AssociationCategories>List</AssociationCategories>
      <StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>     
      <Task0_FormURN>urn:schemas-microsoft-com:office:infopath:ApproverTaskForm:-myXSD-2010-07-06T02-25-34</Task0_FormURN>     
    </MetaData>
  </Workflow>
</Elements>
Turns out this file is pretty straight forward and all the MSDN documentation get this one right.  Please refer to MSDN for more details on specifying the form for your Association forms, Initiation Forms, and/or Task forms.  The key change here is to make sure the TaskContentTypeId is set to the OOB SharePoint InfoPath Workflow Task Content Type:
TaskListContentTypeId="0x01080100C9C9515DE4E24001905074F980F93160"
The other thing to not here is to make sure you get the URN for your form correct!

Deploy and Debug Fun

At this point you should be ready to go!  You should be able to just hit F5 and test your workflow!

Friday, January 7, 2011

SharePoint Interview Questions

1. What are the ways to initiate the workflow?

Automatic (on item added or item deleted)
Manual (standard WSS UI interface)
Manual (Custom UI Interface)

Programmatically through custom code


2. What are the types of input forms that can be created for a workflow?


You can create four different types of input forms including an association form, an initiation form, a modification form, and a task edit form. Note that these forms are optional when you create a workflow template.

3. What are ways to create input forms for workflow?


Two different approaches can be used to develop custom input forms for a WSS workflow template.
You can create your forms by using custom application pages, which are standard .aspx pages deployed to run out of the _layouts directory. ( disadv: lot of code required when compared to Infopath approach)
using Microsoft Office InfoPath 2007 (disadv: picks up a dependenct on MOSS, i.e. it cannot run in a standalone WSS environment)


4. What is the difference between method activity and event activity in WF?

A method activity is one that performs an action, such as creating or updating a task. An event activity is one that runs in response to an action occurring.

5. What does SPWeb.EnsureUser method do?

Checks whether the specified login name belongs to a valid user of the Web site, and if the login name does not already exist, adds it to the Web site. e.g SPUser usr = myWeb.EnsureUser("mmangaldas");

6. While creating a Webpart, which is the ideal location to initialize my new controls?

Override the CreateChildControls method to include your new controls. To make sure that the new controls are initialized.. call 'EnsureChildControls' in the webparts Render method. You can control the exact Rendering of your controls by calling the .Render method in the webparts Render method.

7. How to query from multiple lists?

Use SPSiteDataQuery to fetch data from multiple lists.

8. How Does SharePoint work?

The browser sends a DAV packet to IIS asking to perform a document check in. PKMDASL.DLL, an ISAPI DLL, parses the packet and sees that it has the proprietary INVOKE command. Because of the existence of this command, the packet is passed off to msdmserv.exe, who in turn processes the packet and uses EXOLEDB to access the WSS, perform the operation and send the results back to the user in the form of XML.

9. What is the difference between Syncronous & Asyncronous events?

Syncronous calls ending with 'ing' E.g. ItemDeleting Event Handler code execute BEFORE action is committed WSS waits for code to return Option to cancel and return error codeAsyncronous calls ending with 'ed' E.g. ItemDeleted Event Handler code executes AFTER action is committed WSS does not wait for code to return Executed in its own Worker thread.

10. What is ServerUpdate() ?

Any changes in the list, i.e. new addition or modification of an item. The operation is complete by calling the Update method. But if a List is set to maintain versions. And you are editing an item, but don't want to save it as a new version, then use the SystemUpdate method instead and pass in 'false' as the parameter.

11. What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of the list?

If you use SPQuery on any SPlist. it will bring back results from the current folder only. If you want to get results from all the folders in the list. Then you need to specify the scope of the query by the use of ViewAttributes..e.g. query.ViewAttributes = "Scope=\"Recursive\"";