Friday, October 31, 2008

SharePoint designer hangs while opening the default.aspx

This happened to me many times while trying to open the site in the SharPoint Designer. I was just opening the site using the File--> OpenSite option. It opened the site and displayed the Folder List. However while trying to open the default.aspx, it was not opening it. It was showing the message "Retrieving default.aspx" in status bar, then the message disappears and nothing else happened.
I even tried reinstalling SharePoint Designer. It didn't resolve the problem. However i was able to resolve my problem after registering it.

Everytime while opening site, It used to show me one dialog box to register the product. Somehow i was skipping that step manytimes eventhough our company provides us proper registration key. So, while opening the sharepoint site next time i gave the registration key properly in the dialog box. Now its opening the sites and rendering it properly.

I am not very clear about the funda behind it. But clearly this step resolved my problem.

Thursday, October 30, 2008

w700i Internet settings

I am using internet extensively in my mobile w700i (its outdated now :)) mostly during the 15hrs Bus travel to my native. However the issue i faced was, i was able to use internet only in the default mobile browser. If i tried to connect internet using other mobile browsers like Opera i was always getting "connection failed" error. The same problem happened with other Java based mobile applications using internet.
I asked my friends and i coudn't find the solution, So i was adjusting with the limited features of the default browser comes with my mobile. Last week i got some time to find the solution and finally found that a simple settings change will resolve this!!!!!!

1.Go to Settings-->Connectivity-->Internet Settings-->Internet Profiles
2.Select the profile received from your service provider.
3.Go to Settings-->Connectivity-->Internet Settings-->Settings for Java [this is important. many people will not see this settings(i am one among those)]
4.Select the profile received from your service provider.

If we have a single profile there is no problem because it will be selected by default. But if we have some other profiles for MMS and other things, we need to select the appropriate profile settings.

Update: Adding new menu item in SharePoint edit context menu

I made a blog post about adding a new menu item in SharePoint context menu. I was able to do that easily by deploying the menu item as feature. It is working fine.. However in many cases we may require the menu item only in the particular list and not in all the lists created under the site/site collection.

In that case if you deploy the menu as feature, it will be activated in site/site collection level. So the new menu item will be appearing in all the lists created under the scope specified in the feature.

If we need the menu item only in the particular list. It seems its still easy.. it can be achieved easily, if we follow the steps mentioned in the Shailaja's blog
http://shailajakumar.blogspot.com/2008/01/create-custom-context-menu-in.html

If it is not possible to add a content editor. We can still add our javascript function in a separate javascript file and link it in the master page.

Thursday, October 16, 2008

Creating tasks inside a while activity of workflow

In many of the workflow based projects, one of the important workflow functionality used is "tasks creation". Many times these tasks will be created repeatedly for every process completed by the workflow.
In these kind of scenarios we may require the task creation inside a loop, using "while activity" or the "replicator activity". But if you would like to use the "Create Task" activity inside the "while activtiy", make sure you are doing the following settings correctly otherwise workflow will create the task first time but it will give the error in the subsequent loops.
1. Keep all the task related activities (mostly, "create task", "onTaskChanged" and "complete task") inside a Sequential activity.

2. Use a separate correlation token for the activities inside the "Sequential activity"

3. For all the activities inside the "Sequential activity", Change the Owner activity property value to the sequential activity(this is important)

Following picture shows a simple workflow which contains the "create task" activity inside a while loop. Note that all the task related activities are kept inside the "Sequential activity".


This picture shows the properties of "create task activity". Owner activity name and correlation tokens should be changed as shown in the picture. This needs to be done for all the task related activities inside the "Sequential activity"

Tuesday, October 7, 2008

Create feature.xml for workflows using Code Snippet feature

While creating feature.xml or other XMLs from scratch, many people will be feeling a kind of difficulty. Well, this may not be applicable for people who live with visualstudio :). However while starting from scratch i noticed many of the developers are looking for a copy of feature.xml in features folder or somewhere else.

There is a very easy way to get your code snippet using visualstudio Code Snippet Manager.

1.Open your project in Visualstudio and add a new xml file

2.Press Ctrl K, Ctrl B. It should open Code Snippets Manager. We can also open this from Tools--> Code Snippets Manager menu.

3.Select XML from the Language drop down. Click on the Add button.

4.Select "C:\Program Files\Microsoft Visual Studio 8\Xml\1033\Snippets\Windows SharePoint Services Workflow" folder and "C:\Program Files\Microsoft Visual Studio 8\Xml\1033\Snippets\SharePoint Server Workflow"
Note: The second one is bit descriptive and it will come up with tags related to InfoPath forms and details about receiver class and assembly.




5.Right click in editor and select "Insert Snippet" from the context menu.


6.Select the feature.xml snippet. It will give us the Feature.xml we just need to fill up the template.

Friday, October 3, 2008

XML intellisense support for feature.xml file

This might be a well known point for developers who are already familiar in visual studio development environment. I am just putting this point for the beginners.

This is not specific to feature.xml file. We can use the same technique to get the intellisense support for other XML format files, the point is we need to select the appropriate schema files.

For feature.xml we need to do the following steps to get the intellisense support.

1.Add a blank XML file to your existing visual studio project and save it as feature.xml.

2.Select the properties of the feature.xml file.(F4) and click on the "schemas" property. a dialog box should open.

3.Click on the Add button.

4.Select the wss.xsd file from the Share Point schema location "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\XML\wss.xsd"

5. Make sure the wss.xsd is selected in the "XSD Schema" window. Click on OK.


Now you should be able to use the Intellisense support for feature.xml file and other WSS related XML files