Tuesday, July 29, 2014

SharePoint Apps /Solutions with Odata External Content Type

These days Odata protocol  has gained popularity and importance due to its powerful feature of being platform independent or  interfacing across different  boundaries.
You might have read about different posts which speaks about the forming the External Content Type with OData Urls such as
a)SharePoint 2013: Business Connectivity Services – Consuming OData in BCS using an App External Content Type
b)How to: Use ListData.svc as a External Content Type through BCS
1)As of now Odata External content types can not be created through SharePoint  Designer 2013 and in Visual Studio 2012/2013 it is limited to SharePoint Apps Project
But there is workaround for this ,
i)Create Odata External Content Type using SharePoint Apps Project
ii)Open this project in windows explorer and search for .bdcm files ,which gives BDCMetadata.bdcm
ii)Browse to Central Administration -->Service Application --> BCS  -->Import BCS model   
 On  Import (even after setting the required permission to bdc model)you may come across  the errors saying
 The underlying connection was closed: An unexpected error occurred on a receive.
LobSystem (External System) returned authentication error. Error was encountered at or just before Line:
iii)All you have to do is , Create Secure Store Target application and edit the .bdcm file to update the credentials as described in below articles