web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

MS SQL stored procedure call from web resource

(0) ShareShare
ReportReport
Posted on by 76

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.

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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.

  • Marina Karapetyan Profile Picture
    76 on at

    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 ?

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Marina,

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

  • Marina Karapetyan Profile Picture
    76 on at

    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.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    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.

  • Marina Karapetyan Profile Picture
    76 on at

    what endpoint ?

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Marina,

    With endpoint I meant some kind of webservice.

  • Marina Karapetyan Profile Picture
    76 on at

    ok, thank you.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans