Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

MSCRM online connect to another database through plugin.

(0) ShareShare
ReportReport
Posted on by 2

Hello All,

Is it possible to connect to another database through plugin?

if yes then how?

*This post is locked for comments

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: MSCRM online connect to another database through plugin.

    Hi, we had  a exact same scenario in our project, where in CRM online needed to push data onto a Azure SQL DB for further processing.

    Below are the options we considered.

    1. Using replication services like SCRIBE or Data Export Services

    2. LogicApps

    In our case we did not want to replicate the whole data, so we opted for Logic Apps. It has inbuit connectors which can connect to CRM and Azure DB both. Transformation logic and triggers are also configurable. This is a no-code way of integration. We did consider Flow, however biggest drawback is it dose'nt support DevOps hence idea was dropped.

    Hope this helps.

    Regards,

    Pranav

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: MSCRM online connect to another database through plugin.

    You haven't specified what type of database you want to connect to. From a CRM Online plugin, the only direct access to generic external resources is to make an anonymous web request. So, if you've a web service that accesses the database, and it supports anonymous access (which I wouldn't recommend), then you could do that.

    A better option would be for your plugin to make a call to the Azure Service Bus, and have code from there access the database.

    Or, depending how soon this needs to implemented, you may be able to use the upcoming Virtual Entity functionality

  • Suggested answer
    Mandar Joshi Profile Picture
    Mandar Joshi 2,116 on at
    RE: MSCRM online connect to another database through plugin.

    Is another db a CRM db? Connecting to CRM DB is not recommended but the method remains same for any database. Below link will help.

    blogs.msdn.microsoft.com/.../accessing-a-sql-database-from-a-microsoft-dynamics-crm-plug-in

  • Suggested answer
    Amar Prakash Profile Picture
    Amar Prakash 565 on at
    RE: MSCRM online connect to another database through plugin.

    Yes, it is possible but for CRM online you will get the security error. I will suggest you to create a service on another database and consume the service inside your plugin.

  • Suggested answer
    RE: MSCRM online connect to another database through plugin.

    Yes. The plugin should be registered on the create message of the Entity. Inside your class you could give the connection string and credentials to connect to the SQL. Then, you could insert the desired data to it.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,489 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans