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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 98 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 72

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans