This Post has been superseded by net-SDK-for-Dataverse-Dataverse-ServiceClient
As many of you know, we have a existing .net full framework SDK that we provide for folks to develop client applications that communicate with CDS. This SDK has existed for a long period and arose from the Dynamics 365 aspects of our platform.
We have continued to support this SDK over the last many years over many versions of our platform.
We have been working to update this SDK package to better address the needs of the current platform and the technologies that many of our partners who develop client applications to integrate with the Power Platform use. We are now ready to share this with the larger community for testing and feedback.
Today we have posted the alpha version of the Microsoft.Powerplatform.Cds.Client on nuget. along with a few additional packages that we are using to split out the Dynamics Sales / Service and Marketing centric messages and helpers from the core CDS platform SDK
This version of the SDK libs supports the following and has the following notices:
We have pushed the first version up to nuget, its tagged as preview and I encourage you to read the release notes we provide with the nuget packages. As with most of our Nuget packages that are intended as tools or for developer consumption, we extensively comment in release notes.
Samples and such will be updated overtime on the PowerApps Samples GitHub Site as we move forward with the evolution of this capability. That said, any of the existing CrmServiceClient samples can be used as a base to start.
From a scenario point of view, we are particularity interested in any issues or challenges when using these library in either Asp.net Core or Functions scenarios.
Links for the packages:
if your working against CDS Only, you should only need Microsoft.Powerplatform.Cds.Client. If you do not experience that, or find missing messages in the CDS only scenarios, please let us know.
Note: Please be aware that during the Alpha \ Beta phases, these nuget packages are not supported via official channels.
Support is aware of them, however you will likely be directed back to the community forums for support during the Alpha \ Beta phases. A number of our dev's and PM's do monitor this channel and can respond to questions and feedback.
As we progress this process it is our intent to deprecate then retire the older Microsoft.Xrm.Tooling.* Packages and replace them with updates built on this new set of Nuget Packages.
Thanks All, and we look forward to your feedback on this.
Update: We have setup a github issues site to track issues for this effort:
Update#2: We have now begun posting the code for the CdsServiceClient on this git Hub repro for reference.
Please find the site here: https://github.com/microsoft/PowerPlatform-CdsServiceClient
We have Azure Linux server resource group. So we need to create azure function in .net core 3.1.
So, we got the following package which provide supports in .net core azure function
Microsoft.Powerplatform.Cds.Client -Version 0.2.14-Alpha
Let me include few details about our implementation:
1. We have used Dynamics connection string - ClientSecret Authentication types
2. Following things working fine with the above connection string.
- Retrieve records from Entities - Working fine
- Insert/Update operation in Entity which doesn't contain EntityReference type (Lookup) - Working fine.
3. When we perform Insert/update operation in Entity which contains EntityReference type (Lookup), it gives error
Operation return invalid status code 'Bad Request'
Let me attach some code which we implemented in console application:
var service = new CdsServiceClient(connectionString);
Entity account = GetAccountEntity(service);
Entity coupon = GetCouponEntity(service);
Entity couponPerCustomer = new Entity("couponpercustomer");
couponPerCustomer["couponid"] = coupon.ToEntityReference();
couponPerCustomer["customerid"] = account.ToEntityReference();
When we run above code it gives error in "service.Create(couponPerCustomer)"
Error: Operation return invalid status code 'Bad Request'
@MattB-MSFT I am in the process of migrating our code to .net core so we can leverage v2 and v3 azure runtimes. In the past we have used the a IServiceManagement<IOrganizationService> factory to handle our connections to CRM, but I am noticing that in the Microsoft.Cds.Sdk that the IServiceManagement is not part of the library. After playing around for a little bit I noticed the clone method of the CdsServiceClient and it appears that this is the way to get a new IOrganizationService.
Is the clone method intended to replace the old Service Management way of doing things or is this functionality just not been migrated yet?
Sorry about the delayed response here…. For the future;
The best way to get our attention on these sorts of issues is here: https://github.com/microsoft/PowerPlatform-CdsServiceClient/issues
In this case there was a bug that we resolved for this already based on a bug report regarding using alternate keys + Entity references.
If your still having issues with it, please do open an issue on the GitHub issues list and we can take a look.
Again sorry about the delay in seeing this.
Yes, that is how you create copies now. As you saw, we removed IServiceManagement from the underlying libraries.
That interface was part of the WS-TRUST infrastructure that has been deprecated.
Is it more about Dataverse (aka : CDS Common Data Services) and not about CDM - Common Data Model?
Is there anything related to CDM (not CDS)?
This post is VERY old. The library announced here has already been deprecated and replaced with Microsoft.PowerPlatform.Dataverse.Client
@heaher_italent Can we un-pin this from the forum please?
You have a great point.. I had to item on my list to revisit this and fix it but never got around to it.
Im going to replace this with a post about the current state of this and Pin that one.