How to verify an email is triggered or not when creating an entity in Dynamics crm using the api? - dynamics-crm

I have to verify an email is successfully triggered or not when an entity created or assigned to someone in the Dynamics crm using the web api. Can someone help me with the api query I can use for this?

You can use this below web api query to fetch the result, if there is an email record created for your scenario then the result will show up.
https://devorgname.crm.dynamics.com/api/data/v8.2/emails?$select=activityid&$filter=_regardingobjectid_value eq <record guid>
You can build such queries in CRM REST Builder or even in Advanced find query to validate and download the fetchxml. You can use XrmToolBox plugins like FetchXml builder to enhance the downloaded fetchxml and test.

Related

How to retrieve SharePoint Document details for particular record in MS CRM using FetchXML from Azure API

We have a case where we need to retrieve sharePoint Document details for particular record in Microsoft CRM, we need exactly two information from the record which are the filename and regardingobjectid (to whom this document belongs to).
I found this post:
https://mscrm16tech.com/2020/09/09/get-sharepoint-document-details-for-particular-record-in-ms-crm-using-fetchxml/
I followed the same approch and i used the fetchXML in c# console program it worked as expected but the probleme when I created an API in azure APIM which will communicate with dynamics to get the results of the fetchXML, here is the policy that I have created:
When I test the API I get this error message (statuscode 500)
NOTE: I checked the URL in the browser (with the same fetchXML) and it worked without a problem also the authorization token was added successfully! also I get the same problem when I tested it in Postman.
What is the problem? I really don't know what to do here, any help will be appreciated.

How should I consume a configuration entity on partner portal?

Xrm.WebApi.retrieveMultipleRecords is available on CRM form.
Is there any way to query web api from the javascript on webpages?
Unfortunately we cannot use Xrm.WebApi in portals and they are native to CRM forms.
Recently web api is introduced for portals and you can use it for CUD operations from portal. MS documentation and this blog post can help you to understand and setup the pre-requisites like enabling settings, permissions, verbose.
For entity data retrieval - still we have to use fetchxml liquid tag. Read more

integrating third party application with Dynamics CRM

I'm trying to integrate third party application with the dynamics CRM.
Authenticate the Dynamics User > Importing all the users data into third party application is my target.
But I'm unable to find the proper way to do this. I have gone through the developer docs but didn't find the solution. Can anyone please help me with this ?
Thanks for the clarification. You can get the Web API URL from Settings > Customization > Developer Resources > Instance Web API.
It will be something like:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/
Using that URL you can query the system and get JSON results.
Going to the root URL will give you the collection name (a.k.a. EntitySetName) of all the entities in the system (which for users is systemusers).
Generally the EntitySetName will be the plural of the entity (i.e. just add 's'), but there are some quirky rules for making plurals so its best to confirm the entity set name via the API or a tool like XrmToolbox's Metadata Browser.
The most basic query for users would be:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/systemusers
It will return all fields of all users.
To get a set of fields:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/systemusers?$select=salutation,fullname,jobtitle,createdon,internalemailaddress
To add a couple filters:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/systemusers?$select=salutation,fullname,jobtitle,createdon,internalemailaddress&$filter=isdisabled%20eq%20false%20and%20address1_line1%20ne%20null
Of course you have to do this with Java's XmlHttpRequest. When querying data you can use HTTP GET.
To test the above queries quickly you can simply login to the D365 web client then paste a query into the browser's address bar.
You may also want to check out Jason Lattimer's CRMRESTBuilder. While it doesn't build Java, it gives you a UI to create JavaScript XmlHttpRequests, which you can then translate to Java.
And here's some Microsoft documentation on querying the Web API.

Get Entity Types by calling Dynamics 365 API

Can I found out what entity types are available by calling Dynamics 365 API?
Practically I want this list.
https://msdn.microsoft.com/da-dk/library/mt593046.aspx#bkmk_DerivedEntityTypes
You can get entity list using Web API. Here is description of it. For example you will get all LogicalNames from this:
http://[SERVER_NAME]/[ORG_NAME]/api/data/v8.1/EntityDefinitions?$select=LogicalName

Is there a possibility to get data from google analitycs to CRM via API or else?

We have an web site and CRM. User fills form on a web page then we send this data into CRM as contact. Also Google analitycs gets more info about this user directly from web site. Is there any possible way to get data from Analitycs to combine it with CRM data?
If this is important: Bitrix24.com is used as CRM (installed on our server).
Thanks in advance.
You need this web-site: https://developers.google.com/apis-explorer/?hl=en#p/analytics/v3/analytics.data.mcf.get to construct API-request.
Set your CustomerID in filters field like this: mcf:adwordsCustomerIDPath=={customerID1}

Resources