Hi reader

We have developed a BCS service which takes data from a SQL server data base using web services, we have created an external list in SharePoint which is connected to the BCS service anad displays data, everything was workig fine but client raised a requirement to have some custom control on the external list form, for example client want to see a dropdown for status of an order, by defalut external list displays data in text boxes, just like below screenshot

After spending almost 2 days, I have got the solution which might save ur 2 days J

Idea is that we will create a custom control that will render a dropdown with all possible values, in the sample application I have included some dummy values. We will configure our BDC modal to use our custom control for displaying field on forms.

This is my class which defines creat child control method pf my custom control which renders a dropdown with fixed entries.

Following class uses above class for rendering

Before moving forward, create a simple list and create a column with your custom field, and perform all CRUD operations to make sure custom control is working well.

My BDC modal class with 2 methods

Read list and read item modal configuration, this is the most important part.

Where “EmailField” is class name of my custom control

So final screen look like

That’s it very simple, let me know if you get confused anywhere.

There are not a lot of differences with configuring FBA for SharePoint 2010 compared to 2007, but there are a few.  For instance, SharePoint 2010 no longer supports “classic FBA”, rather forms based authentication is provided through Claims Authentication.  There is also the introduction of the Secure Store Service which is the next-gen of the Single Sign On service of old.

Both of these come into play when configuring Forms Based Authentication.

1 . Configure SQL for membership store

The membership store is still created using the ASP.NET SQL Server Setup Wizard.  This is launched from the .NET 2.0 Framework folder on the server at:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regsql.exe

This wizard will take you thorough the steps and will build out the SQL database for you.




2. Configure Central Admin Web Site to use SQL Membership Provider

SharePoint web sites out of the box are configured to use Active Directory.  So you may be wondering why we’re configuring Central Admin to use FBA when we don’t really want to login in as an FBA user.  Well, we actually don’t want to configure it to to login as a forms user, but we do need to be able to add users from out membership database when configuring site collection admins, and the like.

So all we want to do is tell the Central Admin web application to use our SQL membership provider as well as AD, so when you use the people picker to select users, it will provide results from our membership database.

Open IIS Manager and locate central administration site


Open the Connection Strings Page.  Under Actions menu on the right, select Add… to create a new connection string.  Provide the details for the membership database for the new connection string.



Add Role Provider

Go back to the Web Application page and open up Providers page.  Here we will create a provider for Roles and Users.  Set feature to .NET Roles and click Add… in the Actions pane to add a new role provider.  I called it FBARoleProvider and selected the right type and connection string.



Add Membership Provider

Now set feature to .NET Users and click Add… from the actions pane to add a membership provider.


Select the correct type and connection string, and whatever behaviors you choose.

That’s it for the providers for Central Admin.

To verify that all looks ok, we can check the web.config of the web application.  To get to the right web.config, right-click on the web application under sites, and select Explore.




3 . Configure Secure Store Web Service to use SQL Membership Provider

Everything we did for Central Admin site, we are going to do for theSecurityTokenServiceAppliaation which is in the SharePoint Web Services application.


4. Create Extranet Web Application

Ok, finally we are ready to create our web application (called SharePoint – FBA) that will use FBA authentication.

In Central Admin, Select the Application Management page, and select Manage web applications.  Select New from the ribbon to create a new web application.

Select Claims Based Mode Authentication as Authentication Type. Allow anonymous access and select values for all the other options until you get to the “Enable Forms Based Authentication“.

Add the values we created earlier in the section “Enable Forms Based Authentication” for role and membership provider.



You can specify your custom login page, I will do in later posts.



Click ok and application will be created.

So now our application has been created but we need to configure the same roles and membership providers for this application too, previously we did for only central administration.


So our new web application is here in IIS manager, I will configure it with roles and members


Add a new connection string


Open the .NET Roles page for our web application.  You will receive a warning that the default role provider is not trusted.  There is a pre-configured SharePoint related role and membership is available, so we don’t need to create our own.



Now create some new roles and user for our web application


When u try to open new roles you will see following error message, simple ignore it


We do not have any roles in our database at this point, so let’s create two (StandardUser, SuperUser) by clicking Add… in the actions pane.


Now we need to do the same for .NET Users.  Open the .NET Users page.  You will get a similar warning saying the default is not trusted.  Assuming you don’t let’s add some.  Click Add… from the Actions pane to add users, and assign them roles.



Now create and open the site collection



After creating a new site collection when u open it you will see the following screen


As we have created a user in sql server database and that user is site collection administrator, so use for based authentication.



So you have been logged in with sql server user. That’s it.


Quick steps are one click handlers that performs some operations. Now with SharePoint 2010 and SharePoint designer 2010 it is possible to define quick steps easily.

In this post, we are going to see how we can add new ECB options for list items and also see how to add button in existing ribbon tab. These both options are now possible with SharePoint Designer 2010.

Creating ECB menu option in MOSS 2007 requires creating feature targeting edit control block with CustomActions and deploying it on server.

However there is one limitation for adding control in existing ribbon tab. You cannot have JavaScript function, showing message, disabling controls etc. when creating quick step using Designer 2010. These all can be done via in feature. We will have a detailed post in this topic going forward which is a vast topic.

Open you site and select a list, you will see “New Quick Steps” menu on the top right side.

Let’s go ahead and create one ECB menu option for lists. Open SharePoint Designer 2010. Connect with the site. If you notice, SPD2010 is way different from SPD2007. There are so many differences. SPD2010 looks very clean and clear. It gives very user friendly interface than SPD2007.

Click on Lists and Libraries and choose the list on which you want to create ECB menu item. I have created a new list “Quick Step List”

Double click on the Tasks List to make it open on right side panel, you will see list work flows and custom actions on the top ribbon, we can create new custom actions and work folws from here

When you click on custom action you will see 5 options

I am using “List Item Menu” for this demo because I want to add a quick action on all items page for the list. After clicking you will see the following screen.

Give the name and description. Here you can choose if you have your own page, you can send user to this page with parameters. If you want to initiate any workflow you can do that from here. Or you can also send user to any other url that you wish.

Just to demonstrate i am using Google image and redirecting user to google.com from ECB menu. So mention that URL, use 16 by 16 image of Google, which will be shown to user in the menu item. And finally click on OK. And you are almost done. Remember this image should be in the IMAGES folder under 14 hive. (New structure, not 12 hive like in MOSS 2007)

Save it and move to list item page and create a new entry.

Click on the link and you will be moved to google home page

If you want to edit settings for this quick action, there is a panel for quick actions settings, find you setting and edit it.

Same actions can be added for new disp and edit form, have a try.

Special thanx to SharePointKings for helping me to write this post.

This feature is some of the very much awaited features amongst all new features in SharePoint 2010. People like to edit the item without opening that item in window. Just like ASP.NET grid provides the way of edit and then update by clicking edit button and then updating the record. 

Well, now this was possible in MOSS 2007 as well, but it required little trick, but with SharePoint 2010, it is easy to do that.

Just go to the view settings of any list and then enable the in line editing option.

Check in line editing option and save.

Now move back to list and move mouse cursor near the list item, you will see an “edit” icon against each list item

When u click on the icon, the selected row will be edited and 2 more icons, save and cancel will be displayed.

Make your changes and save. That’s it.

Hi

We all know that there are many out of the box web parts available in MOSS 2007 and now more in SP 2010. Sometimes it is important to see what they offer. Recently I came across to a very good document management related out of the box web part which is relevant documents web part.

This web part was a part of MOSS 2007 and continues to be a part of SharePoint 2010.

This web part is under content rollup section in SP 2010 and under miscellaneous section in MOSS 2007 and these are the configurable properties.

Now I am adding a document

The Relevant Documents web part displays documents that are relevant to the current user. This web part can show following;

Documents last modified by current user
Documents created by current users
Documents checked out by current user

So ultimately it becomes my checked out, my created, and my last modified documents.