Tuesday, May 5, 2009

Frequently asked interview questions in MOSS 2007 - Part II

This article explains the frequently asked interview questions in MOSS 2007 (SharePoint) with answers. This covers basic and advanced concepts of MOSS

If you have not gone through the first part of the FAQs, click here (Part One)

1. What all elements of SharePoint to which Workflows can be applied?
While workflow associations are often created directly on lists and document libraries, a workflow association can also be created on a content type that exists within the Content Type Gallery for the current site or content types defined within a list. Workflows are applied at

  • At the level of a list (or document library)
  • At the level of a content type defined at site scope
  • At the level of a content type defined at list scope

2. What are the ways to initiate the workflow?
The following ways in which the workflows can be initiated

  • Automatic (without User Interface and no user inputs)
  • Manual (standard WSS UI interface - Out of the box user interfaces)
  • Manual (Custom UI Interface developed using .net or InfoPath forms)

3. What are the types of input forms that can be created for a workflow?
You can create four different types of input forms including

  • Association form
  • Initiation form
  • Modification form
  • Task edit form.
Create a Custom Workflow in MOSS with input forms is available here
Note that these forms are optional when you create a workflow template.

4. 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. (The disadvantage with this approach is lot of code required when compared to InfoPath approach).
  • Using Microsoft Office InfoPath 2007 (The disadvantage with this approach is dependent on MOSS and it cannot run in a standalone WSS environment)


5. What is the difference between method activity and event activity in Workflow?

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.

6. What does SPExport/SPImport class do?

This class is available in Microsoft.SharePoint.Deployment namespace.SPExport Supports export of specified content from a source Windows SharePoint Services site collection to a CAB file (with .cmp file extension or custom file extension) in XML format.

SPImport class Supports importing specified content into a Windows SharePoint Services site collection using a migration package (.cmp) file in XML format.Using these APIs, we can Export and Import

To learn more about these APIs, Click here


7. What are the defaults SharePoint permission groups available? How this is different from windows security groups?

Following SharePoint groups are provided by default.

  • Reader - Has read-only access to the Web site.
  • Contributor - Can add content to existing document libraries and lists.
  • Web Designer - Can create lists and document libraries and customize pages in the Web site.
  • Administrator - Has full control of the Web site.

The permissions can be applied at

  • Site collection level
  • Web site/ sub site level
  • Library or list levelList item or page level

We can add Windows user accounts and Windows security groups to your SharePoint groups for providing access.

8. What are the different types of search queries in SharePoint?

Search in Windows SharePoint Services supports three types of search syntax for building search queries:

  • Keyword Query syntax (search terms are passed directly to the Search service using OOB web parts like Search Web part)
  • SQL syntax (extension of SQL syntax for querying crawl databases by customizing the CoreResultsWebPart)
  • URL syntax (search parameters are encoded in URL, and posted directly to the search page E.g http://localhost/search/Results.aspx?q=keyword)

To learn more about search queries click here

9. What is the relationship between Microsoft SharePoint Portal Server and Microsoft Windows Services?

Microsoft SharePoint Products and Technologies (including SharePoint Portal Server and Windows SharePoint Services) deliver highly scalable collaboration solutions with flexible deployment and management tools. Windows SharePoint Services provides sites for team collaboration, while Share Point Portal Server connects these sites, people, and business processes—facilitating knowledge sharing and smart organizations. SharePoint Portal Server also extends the capabilities of Windows SharePoint Services by providing organizational and management tools for SharePoint sites, and by enabling teams to publish information to the entire organization.


10. 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

SPSite site = new SPSite("http://localhost");

SPWeb myweb = site.OpenWeb("");

SPUser usr = myWeb.EnsureUser("username");


11. 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.


12. How to query from multiple lists ?

Use SPSiteDataQuery to fetch data from multiple lists.

13. What are User Defined functions in Excel Services Calculation?

User-defined functions (UDFs) are custom functions that extend the calculation and data-import capabilities of Excel. Developers create custom calculation packages to provide:

  • Functions that are not built into Excel.
  • Custom implementations to built-in functions.
  • Custom data feeds for legacy or unsupported data sources, and application-specific data flows.

To use custom functions in a class as an Excel Services UDF class, you must mark your UDF class and method with the Microsoft.Office.Excel.Server.Udf.UdfClass and Microsoft.Office.Excel.Server.Udf.UdfMethod attributes.UDF assemblies are disabled by default.To Enable UDF Assemblies,Each Excel Services trusted location in the Shared Services Provider (SSP) has an AllowUdfs flag to true.


14. What are the sources of User Profiles information in SharePoint?

User Profile information can be imported from Active Directory through master connection.

In addition to Active Directory, importing profile information from all of the following data sources using Business Data Catalogue (BDC)

  • LDAP directory (which is not Active Directory)
  • Databases such as SQL Server
  • Enterprise applications (like SAP or PeopleSoft)


15. What is the use of query.ViewAttributes OR how can you force SPQuery to return results from all the folders of the SharePoint list?

If you use SPQuery on any SPlist, it will bring back results from the current folder only (One level only).If you want to get results from all the folders in the list (including sub folders) then you need to specify the scope of the query by the use of ViewAttributes.

e.g. SPList oList = oWebsite.Lists["DocLib_Name"];

SPView oView = oList.Views["View_Name"];

SPQuery oQuery = new SPQuery(oView);

oQuery.ViewAttributes = "Scope=\"Recursive\"";




No comments: