Posts

Showing posts from September, 2009

Using sharepoint webcontrols for desinging forms

I prefer using share point web controls for designing share point custom aspx form as they provide extended properties and also provide look n feel similar to out of box look n feel. Following is an useful msdn link for getting help related to controls http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.aspx They are easy to brand with overall theme and master pages. following are list of few important controls Text Box -- SharePoint:InputFormTextBox Drop down -- SharePoint:DVDropDownList People Editor -- SharePoint:PeopleEditor Date Time -- SharePoint:DateTimeControl ( for details on validation) Labels -- Sharepoint:EncodedLiteral Also there are few important webcontrol that can be utilized for creating sections and aligning controls /_controltemplates/InputFormSection.ascx for Defining section /_controltemplates/InputFormControl.ascx for defining control following is a sample ascx for above ---------------------------------------------------------------------- &

How to upload a document in a document library programmatically

Recently I have encountered in a situation where I was required to upload few documents in a document library using my code. I found this fairly simple. Thanks to object model exposed by Microsoft. Following code can be use to upload a document to document library with in specific site. SPSite mySite = new SPSite("http:// "); SPWeb spWeb = mySite.OpenWeb(); SPDocumentLibrary docLib = (SPDocumentLibrary) spWeb.Lists[" "]; SPFolder folder = docLib.RootFolder; using( FileStream fs = File.OpenRead(" " ) ) { SPFile file= folder.Files.Add(" ",fs); file.Update(); } I hope this will be helpful for those who wants to update documents and also needs to perform few custom actions on uploaded documents.

Sharepoint workflow doesnt started automatically

I recently experienced this issues with my custom work flow designed using share point designer. Work flow didn't started automatically even though option was selected. After doing a little research I found that issue was due to a security fix in WSS 3.o SP1 Therefore, after installing WSS 3.0 SP1, declarative workflows will not start automatically start if 1. The Windows SharePoint Services Web application runs under a user's domain account. 2. The user logs in by using this domain account. 3. The site displays the user name as System Account.

Configuring MOSS SSO Service

I was working on configuration settings for MS SSO service in MOSS. I think following information may also be useful for you. You need to perform following simple steps for configuration of MS SSO Service. 1. Configure log on account to administrator user and run Microsoft Single Sign On Service. 2. Go to CentralAdministration->Operations->SecurityConfiguration->ManageSingleSignOn Serice. 3. Configure single sign on using available links i.e. Manage Server Settings, Manage Encrption Key, Manage Setting for enterprise application definition, Manage account information for enterprise application definition For details please see following link http://technet.microsoft.com/en-us/library/cc262932.aspx#Section1

Sharepoint designer workflow : Getting data from user and storing it in workflow vari

Image
Sharepoint designer workflows provide a great functionality using its out of the box activity for collecting data from user with in workflow. When this action is used a form for getting data is created automatically as shown in images below So if a user want to do some small customization the form will be available to him to do so. The data collected in response to this action becomes part of task and can be used later in your flow for any decsion or can be utilized in other actions. For e.g. I used data (comments) from user and update column of my list called comments. This Action ask you three things 1: Data (Used for desinging question and creating form) 2: User (Used for assigning for to MOSS user) 3: Output Variable (List Item Id for fetching data later) In my sample I clicked on data and add a field for asking comments from user. Assigned this to appropriate user and set output variable to a newly created variable collect3 I created a new workflow variable of type comments for s