Hi,
I have an issue using ProcessingQuotesAndSalesOrders sample code from CRM SDK https://www.microsoft.com/en-us/download/details.aspx?id=50032
I've created Credentails XML file to connect to my organization
<?xml version="1.0" encoding="utf-8"?> <Configurations> <Configuration> <ServerAddress>crm.dynamics.com</ServerAddress> <OrganizationName>OrgName</OrganizationName>
<DiscoveryUri>disco.crm11.dynamics.com/.../Discovery.svc</DiscoveryUri> <OrganizationUri>org.api.crm11.dynamics.com/.../Organization.svc</OrganizationUri> <HomeRealmUri> </HomeRealmUri> <Credentials> <UserName>username</UserName> </Credentials> <EndpointType>OnlineFederation</EndpointType> <UserPrincipalName> </UserPrincipalName> </Configuration> </Configurations>
where parameters are from my istance of Dynamics 365: > Settings > Customizations > Developer Resources
Error I received after launching program is:
The application terminated with an error. Metadata contains a reference that cannot be resolved: 'org.api.crm11.dynamics.com/.../Organization.svc'. There is an error in XML document (1, 1384).
While accessing "https://org.api.crm11.dynamics.com/XRMServices/2011/Organization.svc?wsdl=wsdl0" in my browser all works fine, I get valid wsdl file.
What might be wrong?
Thanks in advance for your help.
Mariusz
*This post is locked for comments
Well they will work for on-premise deployments, there only will be the issue with Online instances. To be fair with Microsoft, the SDK is for 8.2 version and most likely you have 9.0 on your online (if it's new version of Online). SDK as a package to be downloaded is deprecated for the newest version, all the libraries will be downloaded via nuget and samples will be provided in Developer Guide on Microsoft Docs. Because of that change there was probably a decision made not to update all these since it's going away anyway :)
Thanks guys, using XRMTooling solve the issues.
Question is, why there are outdated samples in newest SDK? :)
Someone should invest in CMDB
The ProcessingQuotesAndSalesOrders sample code (also visible in the link below):
msdn.microsoft.com/.../gg309346.aspx, is using Microsoft.Xrm.Sdk.Client class instead of the Microsoft.Xrm.Tooling.Connector class.
The Microsoft.Xrm.Sdk.Client class has been deprecated, and although might still work for CRM 2016, I am not sure if still works for Dynamics 365 On-Premise or Online versions.
Take a look at the sample code in the SDK under XRMTooling folder or Online.
It seems like the old samples in the SDK have not been updated to use the XRMTooling namespace.
See the link below Online for additional resources on how to build applications using XRMTooling:
msdn.microsoft.com/.../dn689057.aspx
Hope this helps.
Ok I checked the sample - you will not be able to log in to Online instance of Dynamics365 using this sample, it's very outdated, so in order to run the logic in this sample you will have to prepare your own connection logic (or connect to some on-premise CRM, if you have any). Easiest way to connect to CRM is using Xrm.Tooling assembly which comes also in SDK:
msdn.microsoft.com/.../jj602970.aspx
If by any reason you really need to connect to CRM online without using any libraries, there is another sample in SDK that still works correctly:
"\SDK\SampleCode\CS\GeneralProgramming\Authentication\AuthenticateWithNoHelp"
No, if you look closer these links are correct, it's just stupid code formating on that forum that hide them (hover the link and you will see they are correct)
Aren't you missing "http://" in links for your organization that you stored in configuration file?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156