Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Query and Insert Data in Dynamic CRM from a Microsoft Access Application using VBA

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

What is the best approach to insert and query Dynamic CRM using VBA code. I have a Microsoft Access Database Application what would need to query records in Dynamic CRM and possibly insert data. Is it possible with VBA code. I have used the Dynamic SDK a little in C#, so if I cant accomplish this in VBA, is it possible to make a dll in C# that I can use in VBA?

For example I want to create a Flag field on the Account entity. I would then need my MS Access Application to check whether or not the flag on an Account record is checked. Also I may need to update the Account record with information from the MC Access Application. 

My CRM is hosted by 3rd party vendor. I believe its "On Premise". 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Query and Insert Data in Dynamic CRM from a Microsoft Access Application using VBA

    Is Organization.svc web service different from Microsoft Dynamics 365 Web API?

    msdn.microsoft.com/.../mt593051.aspx

  • ashlega Profile Picture
    ashlega 34,477 on at
    RE: Query and Insert Data in Dynamic CRM from a Microsoft Access Application using VBA

    If you have access to the CRM organization database, look at the FilteredAccount view - all Account entity fields will be there

    If you need more than just "read", or if you don't have access to the database.. Then have a look at what David wrote up there - that's the way to go then

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Query and Insert Data in Dynamic CRM from a Microsoft Access Application using VBA

    Thanks for the reply. I don't want to insert directly into the CRM database. For example I want to create a Flag field on the Account entity. I would then need my MS Access Application to check whether or not the flag is checked.

  • ashlega Profile Picture
    ashlega 34,477 on at
    RE: Query and Insert Data in Dynamic CRM from a Microsoft Access Application using VBA

    If you are on-prem, you might probably query CRM database directly.

    I would not recommend "inserting" directly into the database, though (which is technically possible, but you may end up with all sorts of problems - it's not "supported")

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Query and Insert Data in Dynamic CRM from a Microsoft Access Application using VBA

    You might be able to set a web reference in VBA to the CRM Organization.svc web service, and access the SDK methods through that. In theory I'd expect this to work, though given that VBA is considerably older than the Organization.svc web service, it might not. It's also more likely to work if CRM is using AD authentication; if CRM is configured to use claims authentication then I'd probably go straight to using C# rather than trying with VBA

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,494 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