Saturday, July 24, 2010

Cannot Edit the Associated LOB through BCS Association

There is no way (through SharePoint designer) to provide edit capabilities on a BCS when it is in association (through a foreign key) with another BCS.

Read on, to know how I tried to attempt it..

Today I was able to work on the Write back capabilities of the BCS. It is straight forward to create a BCS on a SQL Server Table.
I just went ahead with Create All operations on my Data Source.
In the wizard, make sure to uncheck the Read-Only property for those columns which need to be Updatable.
Once you are done with the wizard click Finish.

So far, so good. But, I wanted to see how BCS behaves when I have associated tables. I wanted two sets of data coming from different sources say one coming from SQL Server and other from WCF. For the testing, I just tried with another SQL Server Table which had 1:1 association with the first one.
The first table is like tblUserExtended and the second one which had association was tblUser
Both these tables were linked through the tblUser::nUserId and tblUserExtended::nUserId (Think of this as another source which has some extended user data, stored for another application that has to be aggregated)

Follow the msdn article (http://msdn.microsoft.com/en-us/library/ff728816.aspx) to create the association between two BCS entities.

The reason I did that was to have a single external list which will list columns from both User and UserExtended tables and allow the SharePoint user to edit some columns of User and some columns of UserExtended.
SharePoint showed only the columns of tblUser. While the foreign key tblUser::nUserId represents as a tuple internally. So I could not edit columns of UserExtended in that view but association of the UserExtended tuple could be done.

SharePoint out of the box do not support editing the associated BCS (at least for the External Content types created using SharePoint designer).

May be there is a way to do it, but, I could not find it. Let me know if you have a solution for this.

No comments:

Post a Comment