Thursday, September 17, 2009

Change default action of the workflow task in Sharepoint

It is good user exeprience if user can directly edit the task instead of going to View the task and then edit. or instead of going to ECB menu and then select edit item.

User should be edit the task using only single click. here are the steps to achieve this thing.:
Step1. Open master page. and put following javaScript code in the head part of the master page.
function GoToLink(elm)
{
try
{

if (elm.href==null)
return;
var ch=elm.href.indexOf("?") >=0 ? "&" : "?";
var srcUrl=GetSource();
if (srcUrl !=null && srcUrl !="")
srcUrl=ch+"Source="+srcUrl;
var editUrl, regExp;
var dispUrl = elm.href ;

regExp = /DispForm.aspx/i;
editUrl = dispUrl.replace(regExp, "EditForm.aspx");
var targetUrl= editUrl + srcUrl;

if (isPortalTemplatePage(targetUrl))
window.top.location=STSPageUrlValidation(targetUrl);
else
window.location=STSPageUrlValidation(targetUrl);
}
catch(e)
{
alert(e.description);
}
}


Step 2. Make Defer="false" in following markup code in the master page.

3. THe default action of task has been changed to edit item.

4, isnt it cool user experience??

Monday, September 7, 2009

SharePoint Best Practices Conference Notes (London 2009)

Day 1:
http://www.sharepointology.com/general/sharepoint-best-practices-conference-notes-london-2009-day-1/

Day 2:
http://www.sharepointology.com/general/sharepoint-best-practices-conference-notes-london-2009-day-2/

Wednesday, July 29, 2009

Business Data Catalog Definition Editor

A very good tool for creating Application Defination Xml for both Database and WebServices in BDC

Integrated with SharePoint Server 2007 Software Development Kit (SDK).

After installing SDK you can find it under:

C:\Program Files\2007 Office System Developer Resources\Tools\BDC Definition Editor

Must have for MOSS developers


1. SharePoint Server 2007 SDK: Software Development Kit
http://www.microsoft.com/downloads/details.aspx?FamilyId=6D94E307-67D9-41AC-B2D6-0074D6286FA9&displaylang=en

Monday, July 27, 2009

Create a sharepoint webpart

Steps:
1. Create a simple webusercontrol . Put necessary code and controls in it.(For ex, datagrid and code to connect database.) Do not maintain separate code file (ascx.cs) for web user control. Put code in same ascx file only.
2. Put the webusercontrol (.ascx file) in layout folder of sharepoint site where you want to deploy the webpart.
3. Go to VS2008. (Please install VSSWSE.exe before that.)
4. Create new Project -> Select webpart from Visual C# -> sharepoint
5. Add following code :
protected override void CreateChildControls()
{
base.CreateChildControls();
// TODO: add custom rendering code here.
Control objControl = Page.LoadControl("/_layouts/WebUserControl.ascx");
this.Controls.Add(objControl);
}
6. Build and deploy the solution.
7. Go to the sharepoint site -> Site Actions -> EditPage ? Add Web Part.
8. Select your webpart from the list.

Saturday, July 25, 2009

Learning Resources for sharepoint

Learning Resources for sharepoint
1. http://manish-sharepoint.blogspot.com/2009/04/training-material-on-microsoft-office.html

2. http://sharepointdevtest.blogspot.com/

3. http://qmoss.blogspot.com/

Thursday, July 23, 2009

Check "Sign In Automatically" checkbox in Login.aspx of sharepoint

You will required to hide sign in me automatically checkbox.

You will be required to put following java script in the login page.

Wednesday, July 22, 2009

FBA with LDAP in Sharepoint

Configure FBA with AD
=================

http://www.codedigest.com/Articles/Sharepoint/94_Active_Directory_for_FBA_in_SharePoint_using_LDAP.aspx
http://msdn.microsoft.com/en-us/library/bb975136.aspx#MOSS2007FBAPart1_BasicSetup
http://msdn.microsoft.com/en-us/library/bb975136.aspx

Thursday, July 16, 2009

Monday, July 13, 2009

Sharepoint Installation

http://www.pptspaces.com/sharepointreporterblog/Lists/Posts/Post.aspx?ID=28

Tuesday, May 19, 2009

Wednesday, April 29, 2009

Lookup fields processing in custom activity

If you are using SharepointWorkflows with some custom activities you might face this problem.

In your custom activities, you might need dynamic content input from user while creating workflows.

Mail text would be the best example for the same.

In custom activity such as mail send with attachments, needs dynamic content.

For example,

Hi [%List:Username%]

.....

......

Thanks,

[%List:Sender%]

This kind of dynamic content will not be parse if you directly use the input parameter without Helper.ProcessStringField.

Without this processing custom activity will treat it as a string. and and in mail you will get Hi [%List:Username%] text. (instead of Hi Indrajeet..)

So to fix of the problem, 

before using the input in mailsend function you should procees it by using Helper.ProcessStringField(stringFromUserInput, objActivity, this.__Context))

Ex. String retValue = Helper.ProcessStringField(stringFromUserInput, objActivity, this.__Context))


Virtual paths for layouts and theme folders

For themes :

/_Themes/Folder1/test.css

For Layouts :

/_Layouts/Folder2/Page1.aspx