Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

Microsoft.Xrm.Client.Services.OrganizationService does not exist in Microsoft.CrmSdk.XrmTooling.CoreAssembly v9.1.051

Posted on by 5

In CRM 2015, we developed custom code to access Organization service to retrieve/update CRM Org entities with the following code.

string connection = @"ServiceUri=">crmorg.mycrmtest.ourdomain.com;Username=domain\admin;Password=XXXXXXX;";


try
{

CrmConnection crmConnect = CrmConnection.Parse(connection);
crmConnect.ProxyTypesEnabled = true;
crmConnect.Timeout = new TimeSpan(0, 0, 60, 0);
CachedOrganizationService orgService = new CachedOrganizationService(crmConnect);

return orgService;
}
catch (Exception ex)
{
new LogService().Log(Constants.LOG_ERROR, new Error("An error occured while connecting to CRM", ex));
}
return null;

However, when I connect this custom code to the D365 online (cloud) environment, the CrmServiceClient namespace does not have the equivalent class.

So my question is, how can I upgrade the custom code so it will work in the online environment without changing the whole code structure?

Any help to point to the right direction is appreciated.

Please let me know if you have any question.

Thank you.

cdjleeus

  • Cdjleeus Profile Picture
    Cdjleeus 5 on at
    RE: Microsoft.Xrm.Client.Services.OrganizationService does not exist in Microsoft.CrmSdk.XrmTooling.CoreAssembly v9.1.051

    Hi Rui,

    Thank you for the link. I was able to modify my code to connect to organization services.  However in Microsoft.CrmSdk.XrmTooling.CoreAssembly v9.1.051, CachedOrganizationService does not exist anymore, do you know if there is a replacement for this?  What should I do if I want to keep using CachedOrganizationService to improve performance.

  • Suggested answer
    Rui Carvalho Profile Picture
    Rui Carvalho on at
    RE: Microsoft.Xrm.Client.Services.OrganizationService does not exist in Microsoft.CrmSdk.XrmTooling.CoreAssembly v9.1.051

    Hello,

    Have you verified this quickstart sample: docs.microsoft.com/.../sample-simplified-connection-quick-start ?

    You can also download and run the sample that is mentioned here: docs.microsoft.com/.../sample-quick-start

    You can see how it works and modify on your code.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans