Friday, January 18, 2008

Migrating List and Document Libraries in MOSS between servers

List / Document Library Migration

Have you ever got the requirement of just migrating a list/Document Library between servers and not the whole site ?

Well then you are at right place, just down load the tool and start migrating the list with all metadata intact .

Happy Migrating !!!

Download Tool

User Profile Import is not importing updated Manager Information from Active Directory in MOSS

Scenario:

User profile is imported and everything seems to work fine , later there is a change in organization structure for eg there is a manager change for person "x" .In order to reflect this information in sharepoint , you update the information in Active Directory and run import .

Issue :

SharePoint still showing the old manager for person"x" and doesn't seemed to be updated with profile import

Resolution :

Install WSS /MOSS SP1 and you are good to go ....

Thursday, January 17, 2008

Printing SharePoint Web Part

Ever thought of printing a content of web part rather than complete page in sharepoint ?

Follow the Steps:

  • Create Print Button : Add content Editor web part to your page and paste the following script as Source Text


<>
< type="button" onclick="javascript:void(PrintWebPart())" value="Print Web Part">

< language="JavaScript">
//Controls which Web Part or zone to print
var WebPartElementID = "WebPartWPQ6";

//Function to print Web Part

function PrintWebPart()
{
var bolWebPartFound = false;
if (document.getElementById != null)
{
//Create html to print in new window var PrintingHTML = '\n\n';
//Take data from Head Tag if (document.getElementsByTagName != null)
{
var HeadData= document.getElementsByTagName("HEAD");
if (HeadData.length > 0)
PrintingHTML += HeadData[0].innerHTML;
}
PrintingHTML += '\n\n\n';
var WebPartData = document.getElementById(WebPartElementID);
if (WebPartData != null)
{
PrintingHTML += WebPartData.innerHTML;
bolWebPartFound = true;
}
else
{ bolWebPartFound = false; alert ('Cannot Find Web Part'); } } PrintingHTML += '\n\n'; //Open new window to print if (bolWebPartFound)
{
var PrintingWindow = window.open("","PrintWebPart", "toolbar,width=800,height=600,scrollbars,resizable,menubar"); PrintingWindow.document.open(); PrintingWindow.document.write(PrintingHTML); // Open Print Window PrintingWindow.print(); }}< /script>

  • In order to print content from web part you need to connect the desired web part to the print button
  • Get the Div Id of web part from the Page Source and assign it to the variable in Button

Well you would like to check this for simpler explanation :

http://www.imakenews.com/mernstmann/e_article000435389.cfm

Wednesday, January 09, 2008

Granular Level Export/Import of data MOSS

Have you ever wondered what if u have to migrate just a list between servers ,do you need to buy third party tool . Nopes...

Just create a tool using API from Microsoft.SharePoint.Deployment Namespace and it's not as complex as you might think .


Check this great article with samples :

http://blogs.technet.com/stefan_gossner/archive/2007/08/30/deep-dive-into-the-sharepoint-content-deployment-and-migration-api-part-1.aspx

Happy Coding and New Year!!!

Tuesday, December 04, 2007

Infopath cannot add the event handler

While working in Infopath 2007 managed code when i tried to attach managed code to existing
form i got the following error:

Error :

Infopath cannot add the event handler

Infopath cannot create the visual basic or C# project

The location for the visual basic or C# project cannot be found or cannot be accessed


So next steps is to search internet , well no luck in that too . Then i decided to try different things with my form settings and shazam!!! got the form working .

Solution in my case :
  • Go to Tools -> Options ->Design Tab
  • Check the language for programming /select the desired language
  • Go to Tools -> Form Options -> Programming Section
  • Select the programming language which you selected in previous settings

That should be good enough to make you go forward.

In my case there was difference in language settings which caused all these errors, which might be in your case too.

Happy Infopath Programming!!!!

Friday, November 30, 2007

Writing Managed Code for Browser based Infopath 2007 Form

Ever wondered how to write managed code for Browser based infopath form , check this out :

http://www.microsoft.com/downloads/details.aspx?familyid=db1d99d9-0a31-45de-8efb-16c75e194dc3&displaylang=en

Steps in Nutshell :

  • Change the form security to full trust

Tools -> Form Options -> Security and Trust -> Full Trust

  • Publish Infopath Form to Network Share

  • Upload form to the server

Central Administration > Application Management > Manage Form Templates

  • Active form for desired site collection

  • Access the form using url of following format :

http://"server name"/_layouts/formserver.aspx?xsnlocation="site collection address "/formservertemplates/"form name".xsn&openin=browser&QueryParametername="value"

Tuesday, November 27, 2007

Content Deployment MOSS Hurdles

Collection of hurdles which you might encounter while setting up content deployment in SharePoint 2007

http://soerennielsen.wordpress.com/2007/06/19/the-long-path-to-content-deployment/

Content Deployment in Three Steps ........

Step 1:
Allow Incoming Content Deployment Jobs on the Production Site

Step 2 :
Create Content Deployment Path and Job from Staging to Production

Step 3 :
Run Content Deployment Job


For step by step instruction check out the following article :
http://blogs.msdn.com/jackiebo/archive/2007/02/26/content-deployment-step-by-step-tutorial.aspx

Content Deployment Failed Error

You started with content deployment , defined the content path and job . Everything looks good till you actually run the job and bang the mighty long error

"Failed to compare two elements in the array. at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.Sort[TValue](T[] keys, TValue[] values, Int32 index, Int32 length, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.Sort(T[] items, Int32 index, Int32 length, IComparer`1 comparer) at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer) at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer) at System.Collections.Generic.List`1.Sort(IComparer`1 comparer) at Microsoft.SharePoint.Deployment.WebSerializer.GetDataFromObjectModel(Object obj, SerializationInfo info, StreamingContext context) at Microsoft.SharePoint.Deployment.DeploymentSerializationSurrogate.GetObjectData(Object obj, SerializationInfo info, StreamingContext context) at Microsoft.SharePoint.Deployment.XmlFormatter.SerializeObject(Object obj, ISerializationSurrogate surrogate, String elementName, Boolean bNeedEnvelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Serialize(Stream serializationStream, Object topLevelObject) at Microsoft.SharePoint.Deployment.ObjectSerializer.Serialize(DeploymentObject deployObject, Stream serializationStream) at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects() at Microsoft.SharePoint.Deployment.SPExport.Run() *** Inner exception: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPFeature.EnsureProperties() at Microsoft.SharePoint.SPFeature.get_TimeActivated() at Microsoft.SharePoint.Deployment.WebSerializer.ExportFeatureComparer.System.Collections.Generic.IComparer.Compare(ExportObject exportObject1, ExportObject exportObject2) at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)"

OR

" Content deployment failed.The exception thrown was 'System.InvalidOperationException' : 'Failed to compare two elements in the array.'

Solution :
The exception basically means that some of the features activated at the site collection level no longer exist on disk. Their feature definition files have probably been deleted. This can easily occur if you delete some features from your solution packs without deactivating/reactivating all features on deployment .

So pin point the features causing trouble and remove it and you will be good to go .

Tuesday, October 30, 2007

Cross Browser Support for MOSS

The newer version of sharepoint , MOSS 2007 has better cross browser compatibility than the older version . It supports the following browswer :


Windows
Firefox 1.5+
Netscape 8.1+
Mozilla 1.7+
Macintosh
Safari 2.0+
Firefox 1.5+
Unix/Linux
Firefox 1.5+
Netscape 7.2+

Check out the following article to completely understand the browser compatibility and feature support by Level 2 browser :

http://technet2.microsoft.com/Office/en-us/library/ff6c5b8c-59bd-4079-8f0b-de4f8b4e0a861033.mspx?mfr=true

Wednesday, October 17, 2007

Timer Job Failed

ERRORS :
  • The job to enable features on existing sites failed
  • Application Server Administration Service Timer Job Failed

In such cases check the Windows Timer Service running in server , also check the credentials the timer is running which might be a reason of the Jobs failing in server.

Wednesday, October 10, 2007

The file web.sitemap required by XmlSiteMapProvider does not exist

I am using a custom XMLSiteMapProvider where in i have defined a web.sitemap file with urls.
The application worked fine for administrators but i got this error when i tried other users. I am using this control in a SharePoint 2007 Page . After lots of trial it came to my notice that actual error was not identification of the file .The problem was that the normal sharepoint user didn't had enough permission to access the web.sitemap file in web server .

This worked once i gave autheticated user access to the file,kind of fishy though , as i am not expecting this behaviour.

Friday, October 05, 2007

CSS not working on LinkButton

This was my issue , i had defined link button in asp.net like this :


_linkNewIncident = new System.Web.UI.WebControls.LinkButton();
_linkNewIncident.Text = "Creat New Incident";
_linkNewIncident.Click += new EventHandler(linkNewIncident_Click);
_linkNewIncident.CssClass = "HelpDeskLink";

and corresponding CSS as :
.HelpDeskLink { color:white ; font-weight :bolder ; font-size :x-small ; }

.HelpDeskLink a { color:white ; font-weight :bolder ; font-size :x-small ; }


when i ran the application , my links were still blue and was not reflecting any CSS behaviour which is supposed to be white as per my CSS :-(


After some search i got the solution .

Solution : Define "CSS Pseudo-classes"

I modified my CSS style class to the following and it worked ..


a.HelpDeskLink:link
{
color:white ;
font-weight :bolder ;
font-size :x-small ;
}

Monday, October 01, 2007

Server error: This item cannot be deleted because it is still referenced by other pages

You might get this error when you try to delete from the _catalogsmasterpage directory ,. Microsoft has provided a solution which doesn't look convincing at all :

check : http://support.microsoft.com/kb/926812

I used a different method:
  • Open the Master gallery in Explorer view
  • Create a Directory named "Delete"
  • Cut all the un-wanted Master Pages and paste it inside the "Delete" directoty
  • Delete the "Delete" Directory

And you got rid of all the unwanted pages .

Friday, September 28, 2007

Access Denied While Create Page Action

My user came back to me in morning and said that he is not able to create a page and was facing "Access Denied" error, i was amazed as the user had full control to the site. So i tried it with my ID and BANG same error. I was not able to make page too havig the same "Full Control" access.

After a complete half day of search and trying different things gladly it worked ,saved my weekend fun.

Solution which i used to get over the error is to add my ID to the "Administrators" group of site and it's all fixed.

Am not sure weather it is something by architecture of other issue but it saved my day.

I got one solution which still needs to be tested :
Check out :
http://wss.asaris.de/sites/walsh/Lists/WSSv3%20FAQ/DispForm.aspx?ID=1148

Thursday, September 20, 2007

Unable to open Page due to Web Part Error . "Saviour" Web Part Maintenance Page

At some day you decide to test your new webpart and unfortunately web part bombs badly and you end up with page which looks something like this :




Now second thought is to open the page using Sharepoint designer and removing web part , but to the height of disappointment even Designer throws all kind of error.You are all stuck thinking "How can i remove web part ? "

Well trick is to append your page url with querystring " ?contents=1 ".

So if your stuck url is http://localhost then append the query string
http://localhost?contents=1

This will take you to the saviour page "Web Part Maintenance Page" ,remove the webpart and have a happy day forward :)

Wednesday, September 12, 2007

Workflow Failed in SharePoint with Error: Failed on Start (retrying)

In case you are the unlucky one to get this error then i have couple of suggestions .One of them worked for me :)

Check out the 2 ways which might help you to overcome this error:

  • The workflow definition is invalid. :This can be figured out as SPD pops error message in such case

  • Changing the identity of the application pool to a user with administrative rights can cause the workflow to “fail to start“. If this sounds like something you've done, try changing it back to network service and try running the workflow again. (worked for me)

Check out the article by Jason Nadrowski

Reference Architecture: Building a Cost Optimized, High-Throughput HL7, EDI, and FHIR Processing Pipeline on OCI ( Published in Oracle Blog)

 OCI (Oracle Cloud Infrastructure) provides more than 200 services to build your next enterprise application. Explore the blog to learn how ...