How should I consume a configuration entity on partner portal? - dynamics-crm

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

Related

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.

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.

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}

OData v4.0 via ASP.NET WebAPI - Can Excel consume a service?

I have built a few WebAPIs since it was born, including one supporting OData URL filters when that was new. I see now that OData over WebAPI has matured, I see it can serve service metadata.
Is it complete enough for Excel or other OData client tooling to plug and play as if it were a full WCF Data Service (ye olde Astoria)?
That's it. Thanks
OData V1-3 services can be consumed by the Data tab and Power Pivot data source import of Excel. While Excel's support for importing data from OData V4 services will rely on Power Query. That support is planned targeting early next year according to this: https://social.technet.microsoft.com/Forums/en-US/2169958f-9e2a-4fc2-a844-c0dce4c17a19/support-of-odata-v40?forum=powerquery
It is. In the past you had to do the right configuration or do a workaround to populate the OData feed from Web API correctly, to be able to consume it from Excel. Suprotim Agarwal wrote an excellent blog post about all the steps necessary to consume the feed from Excel, including creating and configuring the endpoint and what the steps in Excel are.

How to Generate Typed Data Definition for Web Api Odata

I have read this document "http://jaydata.org/blog/how-to-use-jaydata-with-asp.net-web-api---i" and it shows a very clear and simple way to user web api odata, but in this example, all the data types are defined manually, and I read the words from the document
"The ASP.NET Web API provider does not use server generated metadata to setup the client. You need to provide the JayData library with some information about the data types your about to deal with. This at the moment you can only do manually. Version 1.2.7 of JayData brings Visual Studio development time support for autogenerating the client environment."
Currently, the version 1.2.7.1 is released, but I can't find any information that how to use some tools from jaydata to auto generate these data types.
Is there any document for this?
Yes, we promised it and we did a proof of concept but nobody has asked about it since that post, you're the first, so we think that our current users are happy with either creating the model manually or using WebAPI with oData where the model can be built either dynamically from $metadata or statically with JaySvcUtil.
I can not promise any date when we'll release it.
Can't you just use WebAPI with oData ?

Resources