Search code examples
sql-serversharepointstored-proceduresbcs

Sharepoint 2013 - Using Stored Procedure (CRUD)


I have below SP:

 CREATE PROCEDURE [dbo].[ups_Ins_TblA] @ID int, @Comment nvarchar(max) AS
 BEGIN 
     SET NOCOUNT ON   
     INSERT INTO [db_assets].[Claim]   
         (ID,Comment)  
     Values   
         (@ID,@Comment) 
 END

Basically, my question is, is there a way to call this in BCS Sharepoint(Business Connectivity Service) using out-of-the-box functionality? Can I further adjust the SP so that it can be supported with all 'CRUD' operations? Pls suggest ideas?

Note: I have made the table as simple as possible.

I don't want to make a straight-insert from the table because I have to join this to another table where document resides that's why I want to use SP.

I'd been spending almost 2-3days reading and still going on.. If anyone can direct me to the light, pls help? Thank you so much!!


Solution

  • This is a noob mistake. Apologies.

    The answer is to write your stored procedure separately and assign it the each operation accordingly (Read Item, read List, Create, Update, Delete).

    Yes, there will be 5 sp.

    As long as the mapping of identifier is set appropriately, the creation of Lists will not have issue (with CRUD operation enabled).