web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to get get CRM data from the window application

(0) ShareShare
ReportReport
Posted on by 1,562

Hello team,

I want to get CRM data inside the window application ,Please suggest me how i can use it.

I want to create a window application through that i have to use CRM context.

I have to update entity from it.

like a web application i am using to interact CRM like that given way:

  Microsoft.Xrm.Client.CrmConnection connection = Microsoft.Xrm.Client.CrmConnection.Parse(GetServiceConfiguration());
        Microsoft.Xrm.Client.Services.OrganizationService service;

error found:

Error    1    The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)    C:\Users\cis\Downloads\Drag and Drop\Drag and Drop\Drag and Drop\Form1.cs    13    17    Drag and Drop

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Tin,

    This is a compile error from your application because if can't load the classes it needs to process the code you wrote. You need to download the CRM 2015 and add a reference in VS to Microsoft.Xrm.Client.dll. You also need to make sure your project is set to target .Net 4.5.2 so it can load up the Microsoft dll.

    If this helps I'd appreciate if you would mark this as a Verified answer.

    Thanks,

     Aiden

  • Verified answer
    Community Member Profile Picture
    on at

    Which CRM version are you trying to connect CRM 2013 or CRM 2015? Make sure you are using appropriate Microsoft.Xrm.Sdk.dll, Microsoft.Xrm.Client.dll, Microsoft.Crm.Sdk.Proxy.dll. If you are trying to connect to CRM 2015, build you application with Target .Net Framework 4.5.2

  • Tin Profile Picture
    1,562 on at

    Thanks Aiden,

    I already used reference of 2015 SDK.

    but when I select target framework 4.5.2  and try to run it, comp lire delete my designer page of window. Are you sure we can use CRM SDK inside the window application ?

    becaus i dont have idea about it ? My requirement is "I want to retrive CRM context inside the window application"

  • Tin Profile Picture
    1,562 on at

    Thanks Namita,

    I m using 2015 Online version. and i m using all reference from 2015 SDK.

    and i also used Target .Net Framework 4.5.2 but when i try to run window application then designer page will be deleted by  .Net Framework 4.5.2 environment. but if i m doing the same thing with  .Net Framework 4.5.1 , i got  error :

    " The type or namespace name 'Xrm' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)  

    Are you sure we can use CRM 2015 context in window application ? bcoz i m beginner, i dont have too much idea about it.

  • Abhishek Gupta Profile Picture
    2,003 on at

    Hi,

    Yes, you can use XRM libraries in Windows application to retrieve crm context.

    With your specified error, it is clear that it is not able to find the XRM library. Can you give brief detail what you have done till now.

    Thanks

    Abhishek

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Tin,

    Make sure you reference these .dlls fromCRM 2015 SDK

    Microsoft.Crm.Sdk.Proxy
    Microsoft.Xrm.Client
    Microsoft.Xrm.Portal
    Microsoft.Xrm.sdk
    System.Runtime.Serialization
    System.ServiceModel

    Then compile and see, it should work in windows app.

    Asanka

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans