Web Sockets and Dynamics CRM - websocket

Is it possible to do a Web Hook subscribe with Dynamics CRM?
Eg: Have an external application, which should be able to push changes into DynamicsCRM (like, update of a record), when the external application undergoes a change.
Is it possible to use WebSockets in Dynamics CRM?
Can I force my CRM server to cause a change in the CRM UI, to maybe, show an alert message / redirect the form?
Thanks in advance!
Reposted from https://community.dynamics.com/crm/f/117/t/282877

No. CRM can make Web Hook requests out, but cannot accept Web Hook requests. You'd need something like an Azure function with a Web Hook binding in the middle where the external application makes a request to the function and the function makes a request to CRM.
No. If you are using CRM on-premises you could build something custom but this isn't built into the platform.

Related

Creating case in CRM dynamics from customer form submission

I have a project that I'm working on and could use some help.
Basic idea is to create case in dynamics 365 CRM with data that customer submits trough form on my website. I did some research and found that i can use clickDimension or workflow. Butt this assignment is for my class and i need to do some coding. So my question would be where can i start or better what solution can I do with my code. Should I parse form submission to JSON and then pass it to CRM or just use CRM API and connect it with form. I'm open to any suggestions and if someone can help me and give me a few guidelines on what should I do. My coding knowledge is little limited so don't be hard on me if my first two solutions sounded stupid.
Thank you all :)
As mentioned your desired assignment is to do some coding,
I will do as follow
From submit on your website, Fire code (plugin,c#,java,python)
From your code, connect to Dynamics 365 (crm) webapi
Once you are connected you can easily create case in Dynmics 365 (crm)
If case creation is sucees or failure you can return
Dataverse API
Applicaiton user for Dynamics 365 webapi
Applicaiton user for Dynamics 365 webapi
Applicaiton user for Dynamics 365 webapi
If your website is WordPress based, you can use a plugin from AlexaCRM. Otherwise, if you can send an email from your website to CRM with required details, you can use the Email to Case functionality to automatically create case from emails.

Calling Dynamics CRM Rest API from PCF component, Embedding in Model-Driven App

We are working on a Canvas app that allows user to perform bulk operations such as assigning roles to users, manage privileges, etc. For this, we created a custom connector at the PowerApp that calls the Dynamics CRM Rest API to perform various operations using swagger JSON. The Azure AD tokens have been used for authentication.
To avoid various UI limitations and challenges, we are now planning to switch to model-driven app. Two questions:
1. How can we create a PCF component that consumes/call aforesaid Dynamics CRM rest API?
2. How to embed this component on Dynamics CRM model-driven app, so we can use them in Model-driven apps?
How to embed this component on Dynamics CRM model-driven app, so we can use them in Model-driven apps?
If you decided to use PCF as your component instead of web resource, better know the limitations. PCF control can be rendered either as a field control or dataset control which means you are going to replace the textbox or subgrid into something else for visualization.
Documentation says:
- Replace a field that displays a numeric text value with a dial or slider code component.
- Transform a list into an entirely different visual experience bound to the data set like a Calendar or Map.
How can we create a PCF component that consumes/call aforesaid Dynamics CRM rest API?
If it’s web resource, we will simply utilize Xrm.WebApi for calling crm web api within HTML/ js webresource in same context.
If it’s PCF, still crm context will support you like this:
this._context.webAPI
.retrieveMultipleRecords(TSWebAPI._entityName, queryString)
.then(........
Learn more: Code Reference
Good thing with both of these approach is, no need of extra authentication or token. As they are running inside CRM, current user context will be used. If you want to impersonate some privileged service account for role assignment, it’s possible too using web api header.

Can we develop a functional or process bot using azure service

I'm looking for a solution where my bot can understand users request(may be with LUIS this can be achieved) and verifies/validates the user/requirement with master data. If all good, then connect to my native database(Siebel CRM via API) to perform the defined action and log a reference ticket(via API) and finally send an email to user using outlook. Is this achievable using azure service?
Yes, the Bot Framework can do all of those things:
my bot can understand users request
LUIS is perfect for this.
verifies/validates the user/requirement with master data
All of this can be done within Waterfall dialogs or Prompts. You can either store the master data in the bot code, or query it from an external source and have the bot validate against it.
Here's a good sample for prompts and validation.
connect to my native database(Siebel CRM via API) to perform the defined action and log a reference ticket(via API)
The bot runs on C#/Node, so anything (including calling your APIs) that you can do in C#/Node, you can do in your bot.
send an email to user using outlook
Bot Framework has a specific Email Channel for this or you can use the Graph API.
Recommended Resources
Docs and QuickStarts
Samples Repo
Reference Docs: C# / TypeScript
LUIS Docs

How to do CRUD operations in Microsoft Dynamics CRM using html page

I want to do CRUD operations through HTML page without adding that page in Dynamics CRM's webresource.
Using C# we can connect with dynamics crm and can do get/add/edit/delete operations using CRM's dlls but I don't know the way of doing same from html page which is independent from CRM's webresource.
Can anybody please suggest me that is this possible or not and if yes then the way if there is any.
You can perform CRUD operations on Dynamics CRM 2016 and above using the Web API.
You mention that your application will be independent of CRM, thus it will be on a separate domain. You will therefore need to register CRM in Azure and query the Web API with CORS.
Here is a good example from Microsoft demonstrating how to use ADAL to connect an application with Dynamics CRM.

MS CRM Source of plug-in event

I have written a plug-in and would like to know if it was fired by , the web service api, Import data, web form or outlook client.
Is this possible?
Look at the IPluginExecutionContext.CallerOrigin property (http://msdn.microsoft.com/en-us/library/cc156395.aspx). You can determine if it was from the application, async service, API, or if the plugin is being replayed after coming from offline.

Resources