Is it possible to replace all XRM calls with Dynamics 365 Customer Engagement Web API? - dynamics-crm

I have a project that is referencing an XRM Entity file and I was wondering if calling the API methods can completely replace my interaction with this file. E.g. there is a data contract between this XRM layer and CRM such that when an update happens in code through the XRM layer it will trigger the proper workflows in CRM. Will this interaction still be the case while interacting with the API?

Currently there are two active endpoints in CRM, the 2011 endpoints, and the WebApi endpoints (8.0, 8.1, 8.2, 9 etc). Previously, the SDK for CRM (Microsoft.Xrm.Sdk) has entirely been utilizing the 2011 endpoint via the IOrganizationService. There is a commitment to MS to replace the calls under the covers from the 2011 endpoint to the WebApi.
So if the desire is to use the WebApi and you're doing .net development, I'd just stick with it. If the idea is to remove all dependencies to the SDK, there is nothing stopping you as well. I would argue that you're going to have to spend more time ensuring you're handling all of the WebApi nuances correctly than any potential benefit you'd receive from removing dependencies on the SDK framework.

CRUD operations happening through CRM SDK Org Service or WEB API will trigger the configured WFs seamlessly as per Dynamics platform design.
The file you generated using crmsvcutil is helpful for Early bound coding which will help type check in compile time. Another way (without this file) is Late bound which is runtime check. Web api is going to be Late bound, so file can be retired and calls can be replaced.
If you are blocked with any particular web api call, you can reach out to community for help.

Related

How to host ms bot created in c# or composer in windows service?

We must use C# MS bot in windows service. How to implement it in .Net core for MSBot SDKv4?
All samples using IIS/Azure App service as hosting platform.
They're aren't any examples or samples that show how to explicitly do this. But you should be able to follow articles such as this or this and then tweak as needed. It shouldn't be much different than hosting any other asp.net core application.
The two points to make sure and cover are:
Make sure that the bot/application is configured (whether in appsettings.json or otherwise) so that it has the right configuration data. Specifically appid/password
Ensure the endpoint can be hit by the connector/channels.

Webhooks with Microsoft Dynamics CRM?

We have started to use Microsoft CRM for all our client information however we would like to have the most up to date information from CRM for internal tools.
The way we could do this is by running a tool that looks at the data every x minutes and keeps all updated records in the database.
Could someone give a explination on how we could use webhooks for this and if it actually is possible. This would be a lot more efficient to be notified when there is a change rather than checking all the time.
I have researched and found a few projects but they were all in beta - invite only or not available.
In Dynamics CRM Webhooks are not available as intended in the normal definition.
But you can use plugins to implement your notifications. From MSDN:
https://msdn.microsoft.com/en-us/library/gg328490.aspx
Another way to think about plug-ins is that they are handlers for
events fired by Microsoft Dynamics CRM. You can subscribe, or
register, a plug-in to a known set of events to have your code run
when the event occurs.

Integrating with Dynamics CRM - REST vs. XML vs. SDK

I put together some code for accessing CRM using the DLL's provided in the SDK download and tried out both the early binding approach and late binding approach.
What I'd like to do is in addition to having some custom entities that my users will access in Dynamics (through the Dynamics UI in the cloud), I also want to build some Android apps that talk to Dynamics.
My understanding is that I can talk to Dynamics from Android via REST (assuming I properly handle the authentication and getting tokens using ADAL libraries since my Dynamics instances run on the Microsoft cloud) or I can use the SDK with .NET as a middle-tier.
What's the recommended approach? Is there a best practice? When would I use the DLL's provided in the SDK and maybe wrap them in my own Web API vs. connecting to Dynamics directly via REST?
Please help this noob.
Kind of hard to say, depends on your talents and needs. Here is a great website link to get started though:
http://blogs.msdn.com/b/crminthefield/archive/2015/01/12/build-your-own-crm-mobile-app-s.aspx
Just a note on the Rest calls, you can only perform CRUD operations by default, and will need to jump through some hoops to perform the other calls.

BizTalk CRM Dynamics 4 to Dynamics 2011

My client is doing an upgrade from CRM Dynamics 4 to 2011 and it uses BizTalk 2009 as its ESB, they are currently using the 'Microsoft BizTalk Server Adapter for Microsoft Dynamics CRM 4.0' for the Integration, my question is does anyone know what breaking changes are involved from a BizTalk point of view when this upgrade takes places?
Am I looking at a whole new set of contracts in CRM 11 e.g. WCF meaning code changes, mappings, schemas and moving away from the Adapter (4.) to pure WCF transport communication?
At this moment in time I'm trying to gauge the complexity and migration levels for one service...
Cheers
I have some first hand experience integrating BizTalk with CRM Online 2011.
The major difference is the change from the pre-defined CRM types, allowing compile-time type safety, to an un-typed Wcf interface. A couple of (ugly) solutions to this problem have been documented around the web, but this blog post by Richard Seroter defines a BizTalk-only solution.
We used a third-party supplied adapter, developed by Roedl in Germany. This uses the Wcf Adapter Framework, in a similar manner to the WCF-SQL adapter, to provide a set of compile-time strong-typed schemas. This made it simple to map to and from the CRM types to our legacy system data types.
One disclaimer, we found that performance was "sufficient", without being outstanding. If you need to move a LOT of data back and forth, consider using the bespoke solution, but if lower development cost is your prime motivation, it is worth considering.
The scope of this project as described will be huge especially considering the limitations of the BizTalk Server Adapter. Have they considered using Scribe? You might want to do a simple proof of concept project for them with the free evaluation version. Scribe downloads

Data exchange between two Organization in MS CRM

Is there any way through which I can exchange data between two organization.
I want to do my coding in Plugin only. Can we write a code in plugin by which it accesses/manipulates the data of a different org through web services only and not directly hitting its database.
In know the orgs are different worker groups. Just wanted to know if its possible or if there is any other technique.
Thanks in advance.
The data for each CRM organisation is exposed via web services which differ slightly for CRM 2011 and CRM 4. The best thing to do is download the latest version of the SDK for the target platform as there are several examples in there for plugins and service based operations.
From your plugin you will be able to access the other organisation via this service and a connection to the service for the "local organisation in which the plugin is running will be available from the IExecutionContext parameter passed to your plugin. Any operations you carry out across both orgs will not be transactional though.
Also be sure to take a look at the sync and async options available for the plugins. If their use is appropriate for your scenario consider using an async plugin for the updates to the target org to minimise their effect on the source org.
Plug-ins will work. Hitting the database directly is actually not a supported model anyways. You can also think of using BizTalk as the middleware.

Resources