Query BDC external content type by passing a ID?
-
Saturday, March 03, 2012 12:57 AM
We have a BDC connect to a SQL Server, it represents as a list in SharePoint.
We also have set up a lookup connection on a custom list (to lookup the BDC list).
Basicly, what we try to do is pass the ID of the lookup field and then retrieve data from the BDC list.
Is that possible and any thoughts on it?
Thanks.
Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com,http://mscrm.cnblogs.com , Book: Microsoft Dynamics CRM 2011 New Features with a CRM project tutorial!
All Replies
-
Saturday, March 03, 2012 10:59 AM
Any comments?
Jim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com,http://mscrm.cnblogs.com , Book: Microsoft Dynamics CRM 2011 New Features with a CRM project tutorial!
-
Saturday, March 03, 2012 11:51 PM
Seems like mosts of the SharePoint MVPs are in the MVP summit this week...
I fingered it out, in fact it's very simple. :)
public SPListItem GetItemByBdcId (SPList list, string bdcIdentity) { SPListItem myitem = null; foreach(SPListItem item in list.Items) { if (item["BdcIdentity"].ToString() == bdcIdentity) { myitem = item; } } return myitem; }
http://msdn.microsoft.com/en-us/library/ff464402.aspxJim Wang - MVP Dynamics CRM - http://jianwang.blogspot.com,http://mscrm.cnblogs.com , Book: Microsoft Dynamics CRM 2011 New Features with a CRM project tutorial!
- Marked As Answer by Jim Wang MVPMVP Saturday, March 03, 2012 11:51 PM

