Monday, November 24, 2008

Business Data Catalog (BDC) Part - 3

Hi All,

Here i am back with one more part of BDC.

I suggest to go and read below articles on BDC before proceeding here.

Business Data Catalog (BDC) Part - 1

Business Data Catalog (BDC) Part - 2

After reading part3, you can proceed further from part 4.

Business Data Catalog (BDC) Part - 4

Business Data Catalog (BDC) Part - 5

Business Data Catalog (BDC) Part - 6

Business Data Catalog (BDC) Part - 7

Ok, let’s continue our series of BDC.

Now we will take a closer look at BDC Application and going to make connectable BDC Web parts.

To do that we have to modify our existing BDC XML. Open that XML and find this line.

SELECT au_fname, city, state,address FROM authors WHERE City = @city.


Replace the line with the following line.

SELECT au_fname, city, state,address FROM authors WHERE (City LIKE @city) AND (fname
LIKE @au_fname)


Now add one more FileDescriptor entry in <FileDescriptors> Tag

<FilterDescriptor Type="Wildcard" Name="au_fname"/>



Add MethodInstance Tag in XML, you will find it at the very bottom of our XML.


<MethodInstance Name="AuthorSpecificFinderInstance" Type="SpecificFinder" ReturnParameterName="Authors" />


Now, add one more default value Tag in Parameter City and Direction IN tag.

<DefaultValue MethodInstanceName="AuthorSpecificFinderInstance" Type="System.String">%</DefaultValue>


Add one entire new DefaultValue Tag also.

<Parameter Direction="In" Name="@au_fname">

<TypeDescriptor TypeName="System.String" AssociatedFilter="au_fname" Name="au_fname" IdentifierName="au_fname">

And perform the same steps as we performed in part 1. This time you will find out a new message coming indicating creating profile.



<DefaultValues>

<DefaultValue MethodInstanceName=" <DefaultValue MethodInstanceName="AuthorFinderInstance" Type="System.String">%</DefaultValue>
" Type="System.String">%</DefaultValue>

<DefaultValue MethodInstanceName="AuthorSpecificFinderInstance" Type="System.String">%</DefaultValue>

</DefaultValues>

</TypeDescriptor>

</Parameter>




Once you are done with uploading, you observe one thing. This time it didn’t give warning that it gave in last two parts.

Now go back to your site, import the application definition in business data list web part once again and then perform test once to make sure that web part works.

For example, I have written Oakland as city search and I got the result.



Ok, we have tested this one. Now it’s time to add one more web part in the page. Edit the page and this time adds Business Data Item web part.

Now, Edit the Business Data Item web part and select the same application definition file.

And perform the connection between two web parts.



That is it. Go out of Edit mode now and enjoy the relation between two tables with no code.



I will continue the series of BDC with yet another example.

No comments:




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com