Using the BDLC API
Here are some examples what you can do with PowerShell and your BDLC lists. The example code is available as download here: LINK
Enabling BDLC on a List
To enable the BDLC on a SharePoint Lists we can invoke the EnableBDLCOnList($web, $list, …) function, this function will initialize two objects:
$listSettings = New-Object Layer2.SharePoint.UI.Administration.Lists.ListSettings
$businessDataListConnectorLogic = New-Object Layer2.SharePoint.UI.Administration.Lists.BusinessDataListConnectorLogic
We use the New-Object Cmdlet to create two different BDLC API objects. In this case the full namespace must be specified when creating the objects (please note the namespace is not equal to the assembly name).
Once we call the function with the Web, List and the other required parameters, the function will enable the BDLC in the given list, creating a new configuration item in the BDLC configuration list and assigning the needed event receivers.
Updating All Lists
To update all lists in a site collection that are connected via BDLC you have to invoke the UpdateAllListsInSiteCollection() function. This function will get the BDLC Configuration List by calling the Get-BdlcConfigList() function, after that a ForEach loop will go through all items in this list and get the lists that have to be updated. After this the function will call the UpdateThisList() function and proceed to update the lists where the BDLC is configured.
Update Sensitive Data in the BDLC Configuration List
Some parameters in the BDLC Configuration list are encrypted to provide its sensitive data. If you want to write directly into the configuration list, you have to use the BDLC encryption provided by the API. Invoke the UpdateBdlcListConnectionItem() function to update encoded values directly in the BDLC configuration List.
Disabling BDLC on List
To disable the BDLC on a list the DisableBdlcInThisList() function must be called. This function calls the nested function Get-ConfigItem() to get the item from the BDLC configuration list which is the list where BDLC is installed.
These are just four examples of how to use the BDLC API through PowerShell. Check also the BDLC Programming Guide to learn about all possibilities you have with using the BDLC API.
Download BDLC PowerShell API Sample
Download BDLC Programming Guide