How to Write-Back Existing Records with BDLC

 

The Layer2 Business Data List Connector for SharePoint solves many issues that still exist with SharePoint out-of-the-box external data integration. It makes it as easy as possible to connect native SharePoint lists to almost any external data source, codeless and bi-directional. All native SharePoint list features are available for the connected list.

 

 

Usually, the BDLC is used to fill and synchronize external data into SharePoint, but there are scenarios where you want to synchronize an already existing list into an external data store.

 

This is now possible, but only through the API or a special link targeting the BDLC update page to prevent inadvertent usage.

 

Note: You have to use version 7.2.0.2 or newer to use this feature. Be also aware that this feature is intended for one-off and special use-cases on a list. It is NOT recommended that you use this on a regular basis on a single list.

 

Please note the following requirements and hints for this feature:

 

  • Use of a BDLC primary key is mandatory.
  • BDLC needs a fully configured table as external source. It will only fill records that match (a) the given primary key and (b) the mapped columns. BDLC cannot create an appropriate table in the data source.
  • Best practice is to use a new and empty table as data source.
  • If data is present in the data source, BDLC will overwrite matching records with the SharePoint record. Non-matching external records will not be processed.
  • This feature is meant as a tool to update or migrate SharePoint data once to an external table. It should not be used regularly on the same list; after the initial update, you should be able to use the normal write-back feature.
  • The table in your connected data source cannot have automated keys like auto increment or IDENTITY, if that column is mapped to a SharePoint column.

 

Here is how the link should look like: 

 

  • /sites/yoursite/_layouts/Layer2/bdlcupdate.aspx?action=initialwriteback&list=yourListId&webid=
    yourWebId&source=yourSourceAddressToRedirect 
  • /_layouts/Layer2/bdlcupdate.aspx?action=initialwriteback&list=yourListId&webid=
    yourWebId&source=yourSourceAddressToRedirect

 

Make sure to replace the placeholders (sites, yoursite, etc.) with appropriate values. yourListId is the ID (Guid) of the BDLC connected list, yourWebId the ID of the SharePoint site hosting this list.

 

When you are programmatically calling BDLC functions, here is how to use:

 

public static string DoInitialWriteback(SPList list)

{

var logic = new BusinessDataListConnectorLogic();
logic.Init(list);
return logic.InitialWriteback();

}

 

Please refer to the BDLC Programming Guide for detailed instructions how to include BDLC API in your project.

READY TO GO NEXT STEPS?

Layer2 leading solutions product regsitration icon: a grey square with a big orange pen symbol.

Register for free download.

Keep your Sharepoint in sync. Download and try today.

Contact Us Icon for Layer2 leading solutions

Questions? Contact us.

We are here to help. Contact us and our consulting will be happy to answer your questions.