Showing posts with label Online CRM-2011. Show all posts
Showing posts with label Online CRM-2011. Show all posts

Monday, July 1, 2013

How to get FetchXml of Advance Find View?

    var advFind = _mainWindow.$find("advFind"),
    iOldMode = advFind.get_fetchMode();
    advFind.set_fetchMode(Mscrm.FetchModes.ignoreEmpty);
    var sFetchXml = advFind.get_fetchXml();

Friday, June 15, 2012

Getting an Error while using Online CRM 2011 Value cannot be null.Parameter name: DeviceCredentials


Introduction:

                    I am using CRM 2011 online and facing the Problem of  Value cannot be null.Parameter name: DeviceCredentials.i used the Following code.

ClientCredentials credential = new ClientCredentials();
credential.Windows.ClientCredential = new NetworkCredential("liveid@hotmail.com", "password", "Kartik");
_serviceProxy = new OrganizationServiceProxy(organizationuri, homeRealmUri, credential, null);
_serviceProxy.EnableProxyTypes();
_service = (IOrganizationService)_serviceProxy;
orgContext = new OrganizationServiceContext(_serviceProxy);

If you facing the above problem then use the following code for that.

  var deviceIDcreds = new ClientCredentials();
  deviceIDcreds.UserName.UserName = "11pqlm4ldg5nqps9b4ivlngbfv";
  deviceIDcreds.UserName.Password = "J-n60IBG7h;Ga`b5##SsDQhP";

  var liveIDCreds = new ClientCredentials();
  liveIDCreds.UserName.UserName = "liveid@hotmail.com";
  liveIDCreds.UserName.Password = "password";

 _serviceProxy = new OrganizationServiceProxy(organizationuri, homeRealmUri, liveIDCreds, deviceIDcreds);
_serviceProxy.EnableProxyTypes();
_service = (IOrganizationService)_serviceProxy;
orgContext = new OrganizationServiceContext(_serviceProxy);

Hope this will help you.