Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

MS SQL stored procedure call from web resource

Posted on by 70

Hello,

I have MS SQL stored procedure, in linked server. It have several input parameters and one output parameter(uniqueidentifier). Procedure returns one record.

I need to call it in web resource.

Is it possible to do this without creating any Plugin/Assembly which can be called in Action/Workflow ?

Thanks.

  • RE: MS SQL stored procedure call from web resource

    ok, thank you.

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: MS SQL stored procedure call from web resource

    Marina,

    With endpoint I meant some kind of webservice.

  • RE: MS SQL stored procedure call from web resource

    what endpoint ?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: MS SQL stored procedure call from web resource

    Marina,

    My recommendation - create some kind of endpoint that will call your SQL server and call that endpoint from your plugin. Believe me - I was in your shoes and that's the only good way to implement your scenario.

  • RE: MS SQL stored procedure call from web resource

    I need execute stored procedure for record of contact entity, when the concrete field change value.

    But this procedure is in another server. I can not change that.

    Sorry, I don't tell you that it works perfect on the machine, that connect to SQL by another user.

  • a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: MS SQL stored procedure call from web resource

    Marina,

    My main question - why do you need stored procedure and what's your scenario?

  • RE: MS SQL stored procedure call from web resource

    Andrew,

    I write plugin, It works perfect in debug mode, but from CRM it returns error

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

    Why ? Have you any example that works ?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: MS SQL stored procedure call from web resource

    Marina,

    I don't think there is a good way to implement your scenario without plugin and action. You already described the best way so good luck in making it real.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans