01 June 2012

CRM Online IOrganizationService client

In this post I've updated little bit code to connect to Organization Service CRM Online.


    class Program
    {
        static void Main(string[] args)
        {
            String userName;
            String password;
            String organizationUrl;

31 May 2012

30 May 2012

crmsvcutil.exe generated classes differences

Prepared this post some time ago, but forgot to publish. In any case ...

CRM SDK allow you to use early binding. For this purpose you should use crmsvcutil.exe to generate classes which represent CRM entities. All the classes are derived from Microsoft.Xrm.Sdk.Entity class. I tried to realize what was changed in generated classes since beta version of SDK.

CRM Online Discovery Service client sample

Microsoft allows us to have a 30-days trial online CRM. I've signed up and decided to connect to CRM Online services from my application. At first I've tried to connect to discovery service. The CRM SDK has a sample sdk\samplecode\cs\generalprogramming\discoveryservice\discoveryservice.sln that shows us how to do that. This sample needs Credentials.xml file to be present in your <DISK>:\Users\<user>\AppData\Roaming\CrmServer folder.

13 February 2012

Microsoft explains planned updates to the next version of Dynamics CRM

With interest I've read today this news article. Microsoft explains planned updates to the next version of Dynamics CRM. Detailed document is here. What is interesting. At first that they are going support other browsers, not only Internet Explorer. Good decision and I hope interface will still so rich and useful as it was in previous versions. I'm sure it will costs great efforts.
Another enhancement is that it will have mobile version. I think it was obvious. Also it will contain some industry templates: Life Annuity Insurance Sales, Non-Profit, Health Plan Sales, Wealth Management. My opinion is that potential of Dynamics CRM is greater than it is used now. I suppose that new industry templates from Microsoft should help in market penetration. It will decrease efforts to customization, speed up implementation of new environment.

08 February 2012

DeliverIncoming and DeliverPromote Messages

Recently I've worked on a task, when the user click on the "Track in CRM" button in his Outlook, update some field of the recipients of the email, who are a CRM users. Problem I faced I was not sure what message register the plugin on. At the beginning I've tried register plugin on  Create / Update messages. Plugin was successfully fired, but fields ToCcBcc of the Email entity instance were empty and I was not able to iterate through the list of the recipients of the email. Right messages for this purpose are DeliverIncoming / DeliverPromote. DeliverIncoming message is fired when the user clicks on "Track in CRM" button, and when you have registered image, all recipient fields will be populated with actual values in this case.
JFYI: Here is the list of supported messaged for plug ins.

06 July 2011

IFD Claims based Authentication

Recently I had difficulties with creating client application to CRM deployed using Internet Facing deployment with Claims Based Authentication ADFS 2.0 Sample code shows connecting to IFD CRM only available at CRM SDK samplecode\cs\wsdlbasedproxies\ifd, but it supposes that you have to add Service References to Discovery Service and to Organization Service. I was not going to use Service References, but how to instantiate and configure OrganizationServiceProxy class item in the right way was not clear for me.
In my case ServiceConfigurationFactory class helped me. Below is peace of code how I'm retrieving IOrganizationService instance:

Uri organizationUriIFD = new Uri("https://[server]:[port]/XRMServices/2011/Organization.svc");

credentials.UserName.UserName = "username";
credentials.UserName.Password = "password";


using (Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy _serviceProxy = new OrganizationServiceProxy(config, credentials))
{
// This statement is required to enable early-bound type support.
_serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());

IOrganizationService _service = (IOrganizationService)_serviceProxy;

WhoAmIResponse response = (WhoAmIResponse)_service.Execute(new WhoAmIRequest());
Console.WriteLine(response.UserId.ToString());

Console.ReadLine();
}