Stored Procedures

  • tsarris 5 years, 7 months ago

    Can i map a Stored Procedure to a c1DataSource? What if this store procedure has parameters?

  • 2p
    C1_MichaelE2p 5 years, 7 months ago

    You can use stored procedures when you create an EF model, to map your entity sets to tham, see for example "How to: Define a Model with a Stored Procedure" ( Then you can use those entity sets in C1DataSource and in SEF in general.

  • tsarris 5 years, 3 months ago

    I have this case:
    a stored procedure named Humans with parameters JobID and ReadinessDate and i have a complex type for this named: HumanResults.
    How can i use c1datasource or direclty scope.getitems with this?
    Can you give me an example please?

  • 3p
    C1_NodirT3p 5 years, 3 months ago

    Unfortunately, this is not supported in SEF yet. ClientScope.GetItems and C1DataSource can retrieve entity sets only.

    We will consider adding this feature. Thank you for the feedback.

  • 3p
    C1_NodirT3p 5 years, 3 months ago

    I might make you think that stored procedures are not supported at all, but this is not true.

    If a stored procedure returns Complex Type objects, then you can use the procedure as is because Complex Type objects are not tracked.

    Otherwise, if it returns entities, you can execute it together with DataExtensions.ExecuteIn extension method like this:

    var entities = context.MyStoredProcedure()

    Alternatively, you can add the retrieved entities to the ClientScope using the AddRef method:

    var entities = context.MyStoredProcedure().ToList();
    foreach(var e in entities) { 


  • tsarris 5 years, 3 months ago

    Thank you very much

  • 1p
    njcampbell1p 1 year, 5 months ago

    Can you provide a visual basic example?
    I am trying to bind a FlexGrid to the resultset of a stored procedure.
    I currently have the StoredProcedure_Result defined as a complex type in the data model.

    Thank you.

  • 38p
    Nilay Vishwakarma38p 1 year, 5 months ago

    Hi njcampbell,

    Apologies for responding late on this thread. We are working on the sample and would provide you once it is done from our side.

    Nilay Vishwakarma

  • 38p
    Nilay Vishwakarma38p 1 year, 5 months ago

    Hi njCampbell,

    I apologize for the time taken to reply on this thread.
    This is a limitation, C1DataSource supports only entity sets at design-time, and does not support stored procedure result sets.

    Nilay Vishwakarma

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.


Have questions? Use our Customer Portal at