Lightning Tools Blog

SharePoint Tools, Web Parts and Discussions

MySQL and Business Connectivity Services using BCS Meta Man

Prerequisites

Walkththough

  1. Open Visual Studio 2010
  2. Add a New Project
  3. Select the ‘SharePoint 2010’ node, and then the ‘Empty SharePoint Project’ project type
  4. Give your project a name i.e BCSMetaManMySqlDemo

    Adding a SharePoint Empty Project
    [Click image for larger view]
  5. Click ‘OK’
  6. On the next dialog box, enter the name of where you want to deploy your model, and make sure you select ‘Deploy as a farm solution’ , click ‘Finish’

    Deploy as a Farm Solution
  7. Add a new item to the newly created Project, either right-click on the Project in the Solution Explorer and Navigate to Add New Item, or select the Project Item and press ‘Ctrl+Shift+A’
  8. Select the ‘Lightning Tools’ node, select ‘BCSMetaMan’ Item Type, give your model a name, such as ‘OfficesModel’ and click ‘Add’

    Adding BCS Meta Man Project Item
  9. Click ‘OK’
  10. If prompted, click ‘OK’ on the licensing dialog

    Trial Message
  11. To show the ‘BCS Meta Man Data Source Explorer’ we need to enable it from the Menu item, this new window can be docked so it doesn’t get in your way.

    Open the BCS Meta Man data explorer
  12. Click the ‘Add Connection’ button to show the ‘Connection Dialog’
  13. Change the ‘Data Source’ drop down to ‘ODBC’ and enter your connection string
  14. Enter the correct delimiters and parameter symbol for MySQL

    Adding connection to External System
  15. The Data Source Explorer will now be populated with your Server data

    image
  16. We will be working with the ‘offices’ table, to add it to the Model , just drag it from the ‘Data Source Explorer’ onto the ‘Diagram’

    Adding Table to BCS Meta Man Diagram
  17. When you drop the table you will be shown the following dialog, we want to choose ‘.Net Assembly’ , click ‘OK’
    (Database can be used if you want to create a model which connects straight to your External System without using a .Net Assembly i.e no code solution)

    image
  18. Accept the table name by clicking ‘Next’
  19. We are also going to leave the Identifiers as default, this is because BCS Meta Man has automatically set the primary key as the identifier. Click ‘Next’ again

    Configuring External Content Type Identifiers
  20. Accept the default 3 methods to be created, click ‘Generate’ 

    Configuring External Content Type Methods

    The default 3 methods are:
    • Finder – Returns all items
    • Specific Finder – Returns a single item by identifier
    • IdEnumerator – Returns just the Identifiers for all of the items
  21. Watch as the code is generated for you, think of the time and effort it’s saving!
  22. The External Content Type will appear on the diagram after generation

    Created External Content Type on Diagram
  23. Press F5 to deploy, this will load up your SharePoint Page once deployed
  24. Add a new Business Data List Web Part to your SharePoint page
  25. Click on the ‘Open the tool pane’ link
  26. Click on the icon to show the available External Content Types

    Select the External Content Type
  27. Select our BCSMetaManMySqlDemo.OfficesModel.offices External Content Type, click ‘OK’

    Select External Content Type from Picker
  28. Your MySQL Data is now being displayed in SharePoint from your External System

    Business Data List showing MySQL Data

<Phill/>

Using the Custom Code option for BCS Meta Man

Introduction

In this tutorial I will show you how to connect to your External System using BCS Meta Man, allow BCS Meta Man to automatically generate the Model and .Net assembly for us and then we will customise the C# code of one of the methods.

Prerequisites

  • SharePoint Server 2010
  • Visual Studio 2010 Professional or higher
  • BCS Meta Man
  • AdventureWorks SQL Database

Walkthrough

  1. Open Visual Studio 2010
  2. Add a New Project
  3. Select the ‘SharePoint 2010’ node, and then the ‘Empty SharePoint Project’ project type
  4. Give your project a name i.e BCSMetaManCustomCodeDemo

    Create a SharePoint project

    [Please click the images for a larger view]
  5. Click ‘OK’
  6. On the next dialog box, enter the name of where you want to deploy your model, and make sure you select ‘Deploy as a farm solution’ , click ‘Finish’

    Deploy as a Farm Solution
  7. Add a new item to the newly created Project, either right-click on the Project in the Solution Explorer and Navigate to Add New Item, or select the Project Item and press ‘Ctrl+Shift+A’
  8. Select the ‘Lightning Tools’ node, select ‘BCSMetaMan’ Item Type, give your model a name, such as ‘ProductsModel’ and click ‘Add’

    Add a new BCS Meta Man project item
  9. If prompted, click ‘OK’ on the licensing dialog

    Trial Message Box
  10. To show the ‘BCS Meta Man Data Source Explorer’ we need to enable it from the Menu item, this new window can be docked so it doesn’t get in your way.

    Open the BCS Meta Man data explorer
  11. Click the ‘Add Connection’ button to show the ‘Connection Dialog’
  12. Select the Data Source type, enter your Server name and also select whether to ‘Use Windows Authentication’ or you provide logon credentials, click ‘Connect’

    Connect to the database
  13. The Data Source Explorer will now be populated with your Server data

    See the tables and views available to use
  14. We will be working with the ‘Product’ table, to add it to the Model , just drag it from the ‘Data Source Explorer’ onto the ‘Diagram’

    Drag and drop a table onto the design surface
  15. When you drop the table you will be shown the following dialog, we want to choose ‘.Net Assembly’ , click ‘OK’
    (Database can be used if you want to create a model which connects straight to your External System without using a .Net Assembly i.e no code solution)

    Choose the model type
  16. Accept the default ‘Identifiers’ by clicking ‘Next’

    Accept the identifiers selected
  17. Accept the default 3 methods to be created, click ‘Generate’

    Accept the methods

    The default 3 methods are:
    • Finder – Returns all items
    • Specific Finder – Returns a single item by identifier
    • IdEnumerator – Returns just the Identifiers for all of the items
  18. Watch as the code is generated for you, think of the time it is saving! :-)
  19. Right click on the Generated External Content Type (ECT) and click ‘Manage Entity’

    Manage Entity menu on External Content Type
  20. This will display the Entity Management Dialog where you want to click on the ‘Use Custom Code’ checkbox

    Entity Management Dialog - Selecting Use Custom Code
  21. Click ‘Update’ to save changes, this will change the implementation of all of the methods to use a custom class, i.e the Finder Method will change from

    [BcsMethodType(MethodType.Finder)]
    public staticIEnumerable<GetAllProductEntitysProperties> GetAllProductEntitys()
    {
       AdventureWorksContext dcontext = new AdventureWorksContext(ConnectionString);
        var records = from record in dcontext.Product
                      select newGetAllProductEntitysProperties
                    
    {
                          ProductID = record.ProductID,
                          Name = record.Name,
                          ProductNumber = record.ProductNumber,
                          Color = record.Color,
                          StandardCost = record.StandardCost,
                          ListPrice = record.ListPrice,
                          Size = record.Size,
                          Weight = record.Weight,
                          ProductCategoryID = record.ProductCategoryID,
                          ProductModelID = record.ProductModelID,
                          SellStartDate = record.SellStartDate,
                          SellEndDate = record.SellEndDate,
                          DiscontinuedDate = record.DiscontinuedDate,
                          ThumbNailPhoto = record.ThumbNailPhoto,
                          ThumbnailPhotoFileName = record.ThumbnailPhotoFileName,
                          rowguid = record.rowguid,
                          ModifiedDate = record.ModifiedDate
                      };
        return records;
    }


    To:

    [BcsMethodType(MethodType.Finder)]
    public staticIEnumerable<GetAllProductEntitysProperties> GetAllProductEntitys()
    {
        // IsCustomCode == true, calling CustomGetAllProductEntitys ()
        // Provide your custom implementation with following signature:
        // System.Collections.Generic.IEnumerable<BCSMetaManCustomCodeDemo.ProductsModel.GetAllProductEntitysProperties> CustomGetAllProductEntitys ()
        // You can call DefaultGetAllProductEntitys for the default implementation.
      
    return CustomGetAllProductEntitys();
    }

    private static IEnumerable<GetAllProductEntitysProperties> DefaultGetAllProductEntitys()
    {
        AdventureWorksContext dcontext = new AdventureWorksContext(ConnectionString);
        var records = from record in dcontext.Product
                      select new GetAllProductEntitysProperties
                    
    {
                          ProductID = record.ProductID,
                          Name = record.Name,
                          ProductNumber = record.ProductNumber,
                          Color = record.Color,
                          StandardCost = record.StandardCost,
                          ListPrice = record.ListPrice,
                          Size = record.Size,
                          Weight = record.Weight,
                          ProductCategoryID = record.ProductCategoryID,
                          ProductModelID = record.ProductModelID,
                          SellStartDate = record.SellStartDate,
                          SellEndDate = record.SellEndDate,
                          DiscontinuedDate = record.DiscontinuedDate,
                          ThumbNailPhoto = record.ThumbNailPhoto,
                          ThumbnailPhotoFileName = record.ThumbnailPhotoFileName,
                          rowguid = record.rowguid,
                          ModifiedDate = record.ModifiedDate
                      };
        return records;
    }
  22. BCS Meta Man will also create a partial class for you containing the ‘Custom’ methods

    Partial class with custom methods
  23. By default the ‘Custom’ methods will call the ‘Default’ methods for your External Content Type, which contain the original BCS Meta Man implementation.
  24. To customise a method we can copy the contents from the Default Method and insert it into our custom method and then apply our changes or we can call the default method and use Linq to alter the returned data set. In this example I am just filtering the results down again to only allow people with a Lightning Tools email address to only to view yellow Products – you can however see how this could be used to add your own security trimming of data.

    private static
    IEnumerable<GetAllSalesLT_ProductEntitysProperties> CustomGetAllSalesLT_ProductEntitys()
      {
          IEnumerable<GetAllSalesLT_ProductEntitysProperties> products = DefaultGetAllSalesLT_ProductEntitys();

          SPUser currentUser = SPContext.Current.Web.CurrentUser;

          if(currentUser.Email.Contains("@example.com"))
          {
              products = products.Where(product => product.Color == "Yellow");
          }

          // Finder Method: Used to return all, or filtered subset of, records
        
    return products;
      }

  25. Press F5 to deploy, this will load up your SharePoint Page once deployed
  26. Add a new Business Data List Web Part to your SharePoint page
  27. Click on the ‘Open the tool pane’ link
  28. Click on the icon to show the available External Content Types

    Select the External Content Type
  29. Select our BCSMetaManCustomCodeDemo.ProductsModel.Product External Content Type, click OK
  30. Click ‘OK’ on the tool pane
  31. Your External System data is now displayed in the SharePoint Web Part – As I am logged in with a user with a Lightning Tools email address I get the filtered data

    Filtered Business Data List by user email address

    when logged in as another user (without @lighthningtools)

    All data being returned to Business Data List

<phill/>

Content and Code – a bunch of nice chaps

Last Wednesday we posted on here that we'd noticed some comments left on our blog that linked back to Content and Code by specific target keyword links. This tactic is often used by people selling dodgy Viagra or pushing their Online Casinos so we were very surprised to see this tactic being used by a fellow SharePoint company. We thought this was probably an SEO agency that Content and Code may have been using, but we put up a post with an overly dramatic title with the aim of getting attention and the issue resolved quickly.

Within a couple of hours we had a few emails from people who knew us personally and worked for Content and Code promising to get to the bottom of the issue. Another hour later we had received confirmation that the SEO agency they were using had posted these links without the agreement or knowledge of Content and Code. Everybody from Content and Code offered unreserved apologies straight away which was good of them and so we removed our original blog post.

An important lesson for all of us wanting to increase our web site traffic through organic search results is to be very careful when outsourcing your search engine marketing. Increasing your Google page rank and therefore improving the traffic we get from search is something we all need to commit to over a period of time and something that needs to be worked very hard at. If you engage an SEO agency that offers to do work outside of your actual web site it is very likely that they will be using practices that will either annoy people or get you completely banned from the Google search index. They may not even inform you that they are going to be using tactics that might get you into trouble! There's no shortcut in building a site that gets great search traffic.

As a gesture of good will to the SharePoint community, Content and Code are making a donation to Unicef's appeal for the Pakistan Flood Crisis.

There are no business data types loaded in the catalog

The ‘There are no business data types loaded in the catalog’ can be very annoying when trying to use Business Data List Web Part as it seems your application definition file imported OK into the Shared Service Provider.

One of the common reasons for receiving this is that the user who is trying to setup the BDC List Web Part does not have enough permissions within the Business Data Catalog. You can set these by:

1, Navigate to your Shared Service Provider administration site and click the ‘Business Data Catalog permissions’ link

Manage Business Data Catalog permissions

2, Here you can give users permissions to the Business Data Catalog, and if you click the ‘Copy all permissions to descendants’ it will copy the permissions set down to each separate BDC application and entity.

3, You can set permissions individually to BDC applications or individual entities. Simply click on the Manage Permissions link when viewing application properties:

Manage permissions for BDC application

Or viewing Entity properties:

Manage permissions for BDC entity

Can you write XSL? Want to win an iPad?

The Lightning Conductor Web Part from Lightning Tools allows you to configure a view without having to write any XSL to display multiple columns and set sort criteria etc.  For those who want to provide alternate functionality or custom branding, you can author XSL files if you wish.  The Lightning Conductor Web Part comes with built in styles that can be customized by the customer.

We would like to offer our customers who use the free version and the pay for version a wide selection of XSL files for download.  This will provide our customers the opportunity to take an existing XSL file and tweak it to suit their own requirements. We are inviting any customer or member of the SharePoint community to submit their XSL files to us in order to be the lucky winner of an iPad. 

image

We will host all of the XSL files on our site along with the information about the person who created it.  An example of an existing XSL file we developed is one that displays Calendar items or Task items in a Calendar view:

image

If you have designed or wish to design an XSL file for the Lightning Conductor web part, please send it along with a screenshot to: support@lightningtools.com

You can download the Lightning Conductor Web Part by navigating to: http://www.lightningtools.com/lightning-conductor-2010-web-part.aspx

The deadline for submitting the XSL files is 30th September 2010.  The winner will be announced on our Blog site and on Twitter (@Lightningtools)

<Brett/>

save money and time with the lightning conductor web part

The Lightning Conductor Web Part is a roll up web part for SharePoint that aggregates lists and libraries from across site collections.  If you are using the Content Query Web Part to rollup content, your should find the below money saving tips interesting.

1. The Lightning Conductor 2010 Web Part is available not just for SharePoint Server 2010, but also for SharePoint Foundations. SharePoint Foundations does not include the Content Query Web Part.  Lightning Tools provides a free (non-trial) version of the Lightning Conductor 2010 Web Part which will roll up from a single site collection which can be used in these environments.  If you do require Cross Site Collection functionality, the Full Lightning Conductor 2010 Web Part which aggregates across site collections can be purchased at just $800 per Web Front end server.

2. Need to develop XSL files to show multiple columns?  Development is costly! It will either cost you time for an existing employee to write XSL files to present data rolled up to the Content Query Web Part, or it will cost you to hire a developer to do the same thing.  Then if you require future changes, you need to consult that developer again.  It is likely to take at least one day per XSL file.  You’re likely to be developing many of these.  With the Lightning Conductor Web Part, you can quickly configure multiple columns for display by simply selecting them from an easy to use dialog box. How much are you paying your developer to spend a day writing XSL files?

image

3. The Lightning Conductor 2010 Web Part is so easy to configure, any SharePoint user with the necessary permissions can configure it easily without the help from the IT department.

4. Lightning Tools maintenance plan.  If you purchase the Lightning Conductor Web Part 2010 or 2007 with a maintenance plan, you will receive all future updates. This includes purchasing the Lightning Conductor 2007 Web Part with a yearly maintenance plan from $160 which will get you the Lightning Conductor 2010 web part for free.

5. The Lightning Conductor also allows you to display content that contains dates in a calendar view.  This saves on purchasing Calendar web parts from other vendors.

image

If you wish to speak to a technical member of our team who can provide a demonstration to you of the Lightning Conductor Web Part, please email us: sales@lightningtools.com

<Brett/>

SharePoint Forums – Anonymous Posting

Yesterday we put out a new release of Social Squared – version 1.0.0.6 – our enterprise forum solution for SharePoint 2007 and SharePoint 2010.

The main new feature included in this release is the ability to allow people to anonymously post new topics in an individual forum. This has a few settings so is very configurable:

SharePoint Anonymous Forums

Authenticated Users

Some organizations want to allow users who are authenticated into SharePoint to post anonymously. A good scenario for this is a company feedback forum where the organization wants to get honest feedback from employees. The feedback may be deemed better if employees can leave the comments completely anonymously.

There are a few settings when allowing authenticated users to post anonymously:

Can create topics – allow authenticated users to anonymously create new topics

Can create replies – allow authenticated users to anonymously create replies to existing topics

Require name – if set a textbox asks the user to enter a name when posting anonymously

Require email – if set a textbox asks the user to enter an email address when posting anonymously

Anonymous Users

If you are running a public facing web site then it is unlikely that everyone that visits the site will be authenticated. Social Squared also allows anonymous visitors to post anonymous topics or replies to forums that are setup for this.

The settings are the same as above, so you can set whether these anonymous users can create new topics, or just post replies to existing ones – and also if they are required to enter a name and email address when posting.

Try it out…

We’ve enabled the Test Forum in Social Squared to allow anonymous users to create new topics and replies, you can try it out here:

http://connect.lightningtools.com/default.aspx?action=ViewTopics&fid=7

Download…

You can download a fully functional trial of Social Squared to try out this functionality from here:

Social Squared Download Page.

Coming tomorrow…

In the previous release we added the ability to set where the forums would look up the CSS, image, and user control files it uses to render itself. Tomorrow we’ll be releasing a new UI package that changes the look of the forums so it looks great in SharePoint 2010! It is also a great example of how to customize and deploy a custom look and feel for Social Squared.

configuring the lightning conductor web part to aggregate tasks across site collections

Over the past 10 to 15 years, as computer users we have gotten very used to using email for just about anything including the assigning of tasks.  Unless we receive an email, it just isn’t human nature to go looking for work that may have been assigned to us.  Imagine how many tasks may be assigned to us in SharePoint within all those deeply buried sites and workspaces.

Below is a diagram of just one site collection and where you may be assigned tasks.

image

Rather than relying on Emails, I would like to demonstrate to you how you can use the Lightning Conductor 2010 Web Part to rollup tasks from multiple site collection in SharePoint 2010.

Firstly, Add the Lightning Conductor 2010 Web Part to a page that becomes the central location for all of your employees or department.  It may be for example that you are a sales person and therefore rolling up the content to the Sales Site would be the best idea.

Configure the web part to rollup from ‘All Sales Sites’

image

Configure the view to show the most useful information

image

Set a Filter on the Assigned To column and tick the ‘Me’ check box.  This will ensure that each user see’s only Tasks assigned to them.

image

That’s it!

Getting your tasks from anywhere within an entire web application and seeing tasks assigned just to you is that easy!

You can download a trial of the Lightning Conductor 2010 Web Part from: http://www.lightningtools.com/lightning-conductor-2010-web-part.aspx

<Brett/>

RevertToSelf and the Business Data Catalog

The double hop issue is something that comes up a number of times in support questions when people are using the Business Data Catalog with MS SQL Server, and SharePoint and SQL are on separate servers.

There are a few solutions to this:

1, Implement Kerberos

2, Use Single Sign On

3, Use RevertToSelf

We’ll be stepping through how to use BDC Meta Man to configure RevertToSelf.

1, When you have your entities configured within BDC Meta Man it is time to change the BDC Authentication Type. In the bottom left tree view right click on the root tree node and select ‘Edit…’ from the context menu that appears

Edit BDC Lob System

2, When the Lob System settings form opens up change the Authentication Mode to RevertToSelf

Set Authentication Mode to RevertToSelf

3, You can then click the Save button, and generate your application definition file as normal and import it into SharePoint.

4, When you are trying to use this BDC data within SharePoint, as you are using RevertToSelf - SharePoint will try to connect to SQL Server as the Identity that the Application Pool is running under that the web application is using. To check which account this is, open IIS and expand the application pools.

image

This account will need permissions to read the data in your SQL Server database so make sure you grant the necessary access rights.

If you still need to secure the data to certain users you can do that through the Shared Service Provider by setting the BDC permissions to specific BDC applications or entities.

<nick/>

Lightning conductor 2010 web part – additional features

The Lightning Conductor 2010 Web Part is now on its third iteration offering some excellent new features.  The features included have been driven by our customers requirements so we thank you for all your feedback.

Include all Sub Sites

An improvement to the treeview control allows you to select a sub site and automatically include all new site sites that get created without the need to reconfigure the properties.

image

Audience Targeting

Audience Targeting is now supported in the Lightning Conductor 2010 Web Part allowing you to display only the content which has been targeted to the currently logged on user.  Audience Targeting is not available for user who have SharePoint Foundations and this option will be unavailable unless you are using SharePoint Server 2010.

image

Custom Column Improvements

The Lightning Conductor 2010 Web Part will allow you to easily select custom columns for display.  We have improved the custom columns to allow support for more data types including Managed Meta Data columns.

image

Document Icons

When rolling up from Document Libraries we now allow the option to display document icons.

image

Web Part Connections

You can filter your results in the Lightning Conductor 2010 Web Part by using the Filter Toolbar or by using any of the Out-of-the-Box filter web parts provided by Microsoft.  Below is a Current User Filter web part connected to a document library.

image

Anonymous Access

The Lightning Conductor 2010 Web Part also supports anonymous access.  Something that is not available from the Microsoft Content Query Web Part.

If you would like to trial the Lightning Conductor 2010 Web Part, you can download the trial from: http://www.lightningtools.com/lightning-conductor-2010-web-part.aspx

We also offer a Express version of this web part free of charge which aggregates from the ‘Current Site Collection'' only.  This web part can be found here: http://www.lightningtools.com/free-sharepoint-web-parts.aspx

Don’t have time to trial the web part but you are still interested?  Why not attend one of our weekly demonstrations?  We’ll take up just 30 minutes of your time and will demonstrate the full functionality.  Contact sales@lightningtools.com for details.

<Brett/>

Business Connectivity Services Online Meeting

Join us on Thursday 12th August at 4pm GMT for an Online Meeting to learn more about how you can integrate your data sources with SharePoint 2010 through the Business Connectivity Services. In this meeting we’ll cover

- History of integrating data sources with SharePoint

- Major components of SharePoint 2010 and Business Connectivity Services

- Tooling available from Microsoft and Lightning Tools

- Q & A

 

If you’d like to attend please drop an email to support@lightningtools.com and we’ll send you an invite to the session.

SharePoint Saturday UK

October 2nd 2010 is the date for the very first SharePoint Saturday in the UK and Lightning Tools along with our partners ID Live are arranging it.  SharePoint Saturday has already proved to be a very successful event in both the United States and also Australasia. 

The event is free to attend (Let’s face it! It would have to be, its on a Saturday! :) ).  It is a great opportunity to come and learn more about SharePoint whether you are an end user, SharePoint Admin or SharePoint Dev.  We have some great speakers from the SharePoint community who will be giving up their weekend to come and share with you their knowledge and experience of SharePoint.

No matter where you are in the UK or Europe you will be able to get to SharePoint Saturday easily.  We are hosting it at the Birmingham Metropole Hotel which is right by Birmingham International Airport/Birmingham International Train Station, and major motorway networks. 

Spaces are limited, so if you haven’t done so already, sign up to attend and learn more on the following page: http://www.sharepointsaturday.org/uk/default.aspx

<Brett/>

Network Access for Distributed Transaction Manager (MSDTC) has been disabled

Some people have been getting this error when deploying the Social Squared forums to SharePoint that is running on Windows Server 2008 r2. Here is how to fix it:

  1. Open Component Services.
  2. Computers -> My Computer -> Distributed Transaction Coordinator -> Local DTC -> Properties.
  3. Security Tab -> Enable Network DTC Access, Allow Remote Clients, Allow Inbound, Allow Outbound, No Authentication Required.

image

You can find more information about DTC and how to install it as a Feature here:

http://itknowledgeexchange.techtarget.com/sql-server/how-to-configure-dtc-on-windows-2008/

Social Squared July Release

We released a new version of Social Squared that contains a few fixes that you will want to checkout.

1, Rich Text Editor Buttons and Tooltips

We’ve fixed the rich text editor so that all the buttons now come up with the proper tooltips

image

2, Search box

In our previous version of Social Squared we introduced the search box which allowed you to search your topics and posts for keywords. This was only visible however on the front page of the forum. We’ve changed this so it is available for every forum view such as forums, topics and posts.

image

3, Topics RSS Feed Improved

Each forum has it’s own RSS feed. Before this release the topics RSS feed only had each topic title included which was a hyperlink to the topic within the forums itself. We’ve now improved this so the topics RSS feed actually includes the initial body of the first post of the topic, plus each reply thereafter. This means you can see everything you need to about the topic within your RSS reader

image

4, Moderator bug fixed

If you had setup moderation for a forum, added some moderators – but then changed your mind and turned moderation off, the forum would still be under moderation due to the fact that moderators were still assigned. We’ve now fixed this so that the Moderation checkbox is what controls if a forum is under moderation.

5, Paging bug fixed

There was an issue where topics would not page correctly if your forum was running on a site setup for anonymous access and the user was not logged in. Now fixed.

 

So we are up to version 1.0.0.5 now with Social Squared. We’ve got some cool features coming in next months release which include a new design you can optionally choose to use, plus the ability to allow users to create posts anonymously.

Lightning conductor 2010 web part– improved treeview and XSL view

The Lightning Conductor 2010 Web Part is a cross site collection roll up web part for SharePoint 2010.  The LCWP2010 was released early last month offering the ability to easily roll up content and display multiple columns of data without the need to modify XSL files or XML files as with the Content Query Web Part (CQWP) that comes with Office SharePoint Server 2010.

However, many customers, even though they like the ease of adding multiple columns without modifying XSL files, still require the ability to provide custom or branded views that are unique to their SharePoint 2010 environments. Therefore we have improved the Lightning Conductor 2010 web part to offer the ability to modify your own XSL.

The screenshot below shows the choice of the easy to use SPGridView or the option to select the XSL View.

image

We ship the LCWP 2010 web part with 3 default XSL views including a Calendar XSL so that you can display Task lists and Calendar lists in a Calendar view. 

image

You also have the option to modify the XSL and upload your own XSL views.  Below is an example of this allowing Announcements to be displayed with a custom view.

image

If you want to download the latest release, please go to the following page: http://www.lightningtools.com/lightning-conductor-2010-web-part.aspx

If you already own a license for the Lightning Conductor 2007 web part, contact us to discuss purchasing the 2010 version with a 50% discount.

Kind regards

<Brett/>

BCS Meta Man July 2010 Release

You can download the latest release from here:

BCS Meta Man version 1.2.3.0

ODBC Support

BCS Meta Man now supports the creation of BCS Models for ODBC data sources. We have a walk through of how to use BCS Meta Man to connect to DB2 here:

DB2 and the Business Connectivity Services in SharePoint 2010

We’ll have some more walk throughs of different ODBC data sources coming in the next few days.

MS SQL Server Stored Procedures

BCS Meta Man now supports the creation of BCS Models using Microsoft SQL Server stored procedures for all BCS method types. We’ve created a lot of walk throughs for you:

Business Connectivity Services Model Using Stored Procedures

BCS Model using Stored Procedures with Parameters

Business Connectivity Services Associations using Stored Procedures

Creator and Updater BCS Methods using Stored Procedures

Change to Licensing

Licensing of a product - especially when you want to create a trial version that people can try out – is never easy. We’ve changed how the licensing for BCS Meta Man works, here is what you now get:

1, Trial version – full functionality, works for 14 days. You can contact us for a key to get this trial extended if you need longer to evaluate.

2, Professional version – what you pay for, works forever :)

Before the trial version was not time limited, but you could only use 2 ECTs and some of the functionality was not available. By making all of the functionality available but limiting it by time, we hope that everybody will be able to properly now evaluate BCS Meta Man and see how useful it is.

Conclusion

We are already working hard on the next release of BCS Meta Man. If some functionality is missing that you think is important make sure you let us know about it by emailing support@lightningtools.com

DB2 and the Business Connectivity Services in SharePoint 2010

In this walkthrough we will demonstrate how to integrate a DB2 database with Microsoft SharePoint 2010 through the BCS and ODBC and display DB2 data on SharePoint 2010 page. In order to do this we will describe how to create a new external content type by using BCS Meta Man.

  1. Prerequisites:
  2. Open Visual Studio 2010
  3. Create a New Project
  4. Select the “SharePoint 2010” node, and then the “Empty SharePoint Project” project type
  5. Give your project a name i.e DB2BCSMetaManDemo and click “OK”
    Create DB2BCSMetaManDemo project 

    [Please click the images for a larger view]
  6. On the next dialog box, enter the url of where you want to deploy your model, and make sure you select “Deploy as a farm solution” , click “Finish” button
    Deploy as a farm solution
  7. Add a new item to the newly created Project, either right-click on the Project in the Solution Explorer and Navigate to Add New Item, or select the Project Item and press “Ctrl+Shift+A”
  8. Select the “Lightning Tools” node, select “BCSMetaMan” Item Type, give your model a name, such as “DepartmetModel” and click “Add”
    Add a new BCS MetaMan project item
  9. If prompted, click “Trial” on the licensing dialog
  10. To show the “BCS Meta Man Data Source Explorer” we need to enable it from the Menu item, this new window can be docked so it doesn’t get in your way
    Open the BCS MetaMan data source explorer
  11. Click the “Add Connection” button to show the “Connection Dialog”
  12. Select “ODBC Server” as Data Source type, enter DB2 ODBC connection string (for example it can be “Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=cygnus;port=50000;Protocol=TCPIP;Uid=Administrator;Pwd=12345;Trusted_Connection=false;”), enter double quotes as left and right delimiters and “?” as parameter symbol and click “Connect” button
    DB2 ODBC connection string
  13. The Data Source Explorer will now be populated with your DB2 data
    See the tables and views available to use
  14. We will be working with the ADMINISTRATOR.”DEPARTMENT” table, to add it to the Model , just drag it from the “Data Source Explorer” onto the “Diagram”
  15. When you drop the table you will be shown the following dialog, we should choose “Database , click “OK”
    Choose the model type "Database"
  16. Accept the default entity name by clicking “Next”
    Accept the default entity name
  17. Accept the default “Identifiers” by clicking “Next”
    Accept the Identifiers selected
  18. Accept the default 3 methods to be created, click “Generate” (The default 3 methods are: “Finder” – Returns all items, “Specific Finder” – Returns a single item by identifier, “IdEnumerator” – Returns just the Identifiers for all of the items )
    Accept the methods
  19. Press F5 to deploy, this will load up your SharePoint Page once deployed
  20. Add a new External list by selection on SharePoint page “Site Action”->“More Options”->“External List”
    Add a new External List
  21. Click on the icon to show the available External Content Types
    Select the External Content Type
  22. Select our DB2BCSMetaManDemo.ADMINISTRATOR_DEPARTMENT External Content Type, click “OK”
    Select the the Department External Content Type
  23. Click “Create”
  24. Your External System data from DB2 database is now displayed in the SharePoint External List
    External Data from DB2 is now shown within SharePoint 2010

We hope this walkthrough will be useful for you. If you have any questions feel free to email them to support@lightningtools.com

Social Squared Feature Pages

We’ve just updated the Social Squared homepage with a number of sub pages that highlight some of the cool functionality in our SharePoint forums web part for larger organizations, check them out here:

- Unread topic indication
- Topic and post moderation
- Email alerts for new topics and posts
- User post count
- Topic ratings
- User signatures
- Search
- Quote posts in your reply

If you want to try out the forums yourself make sure you take a look at our Connect Site and try posting something over there.

<nick/>

Creator and Updater BCS Methods using Stored Procedures – BCS Meta Man

Introduction

In this tutorial we will show you how to use Stored Procedures to add a new record to a Microsoft SQL Server database using an External List and also to Update and existing record using BCS Meta Man.

We are going to follow on from the ‘BCS Meta Man – Using Stored Procedures – Adding a Specific Finder and IdEnumerator’ walk through.

Prerequisites

  • SharePoint Foundation 2010 or SharePoint Server 2010
  • Visual Studio Professional or higher
  • BCS Meta Man
  • AdventureWorks SQL Database
  • An SQL Stored Procedure for the Specific Finder Method

 

USE [AdventureWorks]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:        Lightning Tools Ltd
-- Create date: 07/16/2010
-- Description:    Sample Stored Procedure to return single Customer information
-- =============================================
CREATE PROCEDURE [dbo].[uspGetCustomerByCustomerID] 
    -- Add the parameters for the stored procedure here
    @CustomerID int = null 
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
SELECT      CustomerID,
            Title,
            FirstName,
            MiddleName,
            LastName,
            EmailAddress
            
FROM         SalesLT.Customer
WHERE     (CustomerID = @CustomerID)
END

GO
  • A SQL Stored Procedure for the Creator Method for the Customer Table such as:

 

USE [AdventureWorks]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:  Lightning Tools Ltd
-- Create date: 07/16/2010
-- Description: Sample Stored Procedure to create new Customer
-- =============================================

CREATE PROCEDURE [dbo].[uspCreateCustomer]
       @Title                       nvarchar(8), 
       @FirstName                   nvarchar(50), 
       @MiddleName                  nvarchar(50), 
       @LastName                    nvarchar(50), 
       @Suffix                      nvarchar(10),
       @CompanyName                 nvarchar(128),
       @Phone                       nvarchar(25),
       @EmailAddress                nvarchar(50) 
       
AS 
BEGIN 
     SET NOCOUNT ON 

     INSERT INTO SalesLT.Customer
          ( 
            NameStyle,
            Title,
            FirstName,
            MiddleName,
            LastName,
            Suffix,
            CompanyName,
            SalesPerson,
            EmailAddress,
            Phone,
            PasswordHash,
            PasswordSalt,
            rowguid,
            ModifiedDate
                      ) 
     VALUES 
          ( 
            0,
            @Title,
            @FirstName,
            @MiddleName,
            @LastName,
            @Suffix,
            @CompanyName,
            'adventure-works\linda3',
            @EmailAddress,
            @Phone,
            'passwordhash',
            'salt',
            NEWID(),
            GetDate()
            
          ) select [CustomerID] from SalesLT.Customer       

END 

GO
  • A SQL Stored Procedure for the Updater Method for the Customer Table such as:

    USE [AdventureWorks]
    GO
    
    SET ANSI_NULLS ON
    GO
    
    SET QUOTED_IDENTIFIER ON
    GO
    
    -- =============================================
    -- Author:  Lightning Tools Ltd
    -- Create date: 07/16/2010
    -- Description: Sample Stored Procedure to update Customer by Customer ID
    -- =============================================
    
    CREATE PROCEDURE [dbo].[uspUpdateCustomer]
           @CustomerID               int, 
           @Title                    nvarchar(8) = null, 
           @FirstName                nvarchar(50) = null, 
           @MiddleName               nvarchar(50) = null, 
           @LastName                 nvarchar(50) = null, 
           @EmailAddress             nvarchar(50) = null      
    AS 
    BEGIN 
         SET NOCOUNT ON 
    
         UPDATE SalesLT.Customer
         SET
        [Title] = IsNull(@Title,Title),
        [FirstName] = IsNull(@FirstName,FirstName),
        [MiddleName] = IsNull(@MiddleName,MiddleName),
        [LastName] = IsNull(@LastName,LastName),
        [EmailAddress] = IsNull(@EmailAddress,EmailAddress)
        WHERE
        CustomerID = @CustomerID
    END 
    
    
    GO

 

Walkthrough

  1. Complete the ‘BCS Meta Man – Using Stored Procedures – Adding a Specific Finder and IdEnumerator’ Tutorial but make sure you use the Specific Finder Method Stored Procedure from above as the Update and the Specific Finder Method need to use the same columns.

  2. You should have the following External Content Type on your Diagram

    External Content Type on Design Surface
  3. From the ‘BCS Meta Man Data Source Explorer’ drag and drop your Creator method Stored Procedure onto the Customer External Content Type.

    Drag and drop your Creator Stored Procedure
  4. Select ‘Creator’ as the ‘Method Type’
  5. For each Parameter select the appropriate column to map it to, click ‘OK’

    Map each parameter to each column
  6. Our Creator Method has been added

    External Content Type with Creator method
  7. Next drag and drop your Updater method onto the ‘Customer’ External Content Type
  8. Again, map the the Parameters to the columns, click ‘Save’
  9. The complete External Content Type will look like the following

    External Content Type with Updater method
  10. Press F5 to deploy, this will load up your SharePoint Page once deployed
  11. Next we need to create an External List
  12. While viewing your SharePoint site through the browser, click on Site Actions –> More Options…
  13. From the list of items to create select ‘External List’ and click the ‘Create’ button
  14. In the configuration screen that opens up, give your External List a name and use the External Content Type picker to select the External Content Type we have just deployed to SharePoint

    Create an External List
  15. Click ‘Create’
  16. You can hover over the first column of your list and you’ll see a drop down appear. If you click the drop down arrow you’ll get a number of options for that particular row of data – one of which will be Edit Item

    Edit items through External List
  17. You will be presented with the editing dialog  

      Edit Item Dialog
  18. This will save the changes directly back to your external data system that the external content type is hooked up to.
  19. While viewing the external list, if you click the Items tab on the ribbon you’ll see a New Item button.

    Add new data through the external list
  20. This will bring up the ‘New Item’ dialog where you can add a new customer.

    New Item Dialog 

<phill/>

Business Connectivity Service Associations using Stored Procedures - BCS Meta Man

Introduction

In this tutorial we will show you how to connect to Microsoft SQL Server and use stored procedures to create an association between two External Content Types using BCS Meta Man.

We are going to follow on from the ‘BCS Meta Man – Using Stored Procedures – Adding a Specific Finder and IdEnumerator

Prerequisites

  • SharePoint Foundation 2010 or SharePoint Server 2010
  • Visual Studio Professional or higher
  • BCS Meta Man
  • AdventureWorks SQL Database
  • A SQL Stored Procedure for the Finder Method for the Orders Table such as
USE [AdventureWorks]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:        Lightning Tools Ltd
-- Create date: 07/16/2010
-- Description:    Sample Stored Procedure to return Order information
-- =============================================
CREATE PROCEDURE [dbo].[uspGetOrders] 
    -- Add the parameters for the stored procedure here
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
    SELECT     CustomerID, SalesOrderID, TotalDue
FROM         SalesLT.SalesOrderHeader
END

GO
  • A SQL Stored Procedure for the association such as
USE [AdventureWorks]
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:        Lightning Tools Ltd
-- Create date: 07/16/2010
-- Description:    Sample association Stored Procedure to return Orders by Customer ID
-- =============================================
CREATE PROCEDURE [dbo].[uspGetOrdersByCustomerID] 
    -- Add the parameters for the stored procedure here
    @CustomerID int = 0
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON;

    -- Insert statements for procedure here
SELECT     SalesLT.Product.Name,
SalesLT.SalesOrderDetail.OrderQty,
SalesLT.SalesOrderHeader.TotalDue,
SalesLT.SalesOrderHeader.CustomerID, SalesLT.SalesOrderDetail.SalesOrderID,
SalesLT.Product.Color FROM SalesLT.SalesOrderDetail INNER JOIN SalesLT.SalesOrderHeader ON SalesLT.SalesOrderDetail.SalesOrderID = SalesLT.SalesOrderHeader.SalesOrderID
INNER JOIN SalesLT.Product ON SalesLT.SalesOrderDetail.ProductID = SalesLT.Product.ProductID WHERE (SalesLT.SalesOrderHeader.CustomerID = @CustomerID) END GO

Walkthrough

  1. Complete the ‘BCS Meta Man – Using Stored Procedures – Adding a Specific Finder and IdEnumerator’ Tutorial

  2. You should have the following External Content Type on your Diagram

    External Content Type already on diagram
  3. From the ‘BCS Meta Man Data Source Explorer’ drag and drop your ‘Orders’ Stored Procedure Finder Method onto the diagram
  4. Name the External Content Type ‘Order’, Click ‘OK’
  5. Select 'Finder’ as the Method Type, Click ‘OK’
  6. You should now have 2 External Content Types on the diagram

    Both External Content Types on the design surface
  7. Switch to the ‘Toolbox’ pane in Visual Studio (Ctrl-Alt-X)
  8. Select the ‘Association’ toolbox item from the list

    Select the Association toolbox control
  9. With the Association selected, Click and Drag from ‘Customer’ to ‘Orders’

    drag and drop between your two ECTs

  10. When you release the ‘Association Configuration’ dialog will show
  11. Switch back to the ‘BCS Meta Man Data Source Explorer’ tool window pane
  12. Drag the Association Stored Procedure onto the Arrow in the ‘Association Configuration’ dialog, it will turn green when OK to release.

    Drag and drop your association stored procedure
  13. The dialog will update with the selected Stored Procedure

    Map the Store Procs parameters to identifiers
  14. Select ‘CustomerID’ in both the Parameter and Identifier drop-down list boxes, Click ‘Save’
  15. The diagram will update to show an arrow indicating we have an association between the two External Content Types

    Association has been created
  16. Press F5 to deploy, this will load up your SharePoint Page once deployed
  17. Add a new Business Data List Web Part to your SharePoint page
  18. Click on the ‘Open the tool pane’ link
  19. Click on the icon to show the available External Content Types

    Open the picker to select your ECT 
  20. Select our ‘BCSMetaManStoredProcedure.Customer’ External Content Type, click OK 

    Select the Customer External Content Type
  21. Click ‘OK’ on the tool pane
  22. Click the ‘Add’
  23. Your External System data is now displayed in the SharePoint Web Part

    Business Data List Web Part
  24. Next, Add a new ‘Business Data Related List’ Web Part to the page
  25. Configure the Web Part to use the ‘Orders’ External Content Type
  26. The Web Part will display a message saying the following

    Need to setup web part connections
  27. To do this we can set up the connection using the small arrow from the top right of our Web Part

    Use the web part menu to create a connection
  28. Once this is done we can click on the arrows next to an item in our ‘Customer’ web part and their orders will display on our ‘Orders’ web part

    Related list web part now show association data

<phill/>