Dynamics CRM 4 SDK for the iPhone via MonoTouch
We are working on a version of the Dynamics CRM 4 SDK that
will work with the iPhone via MonoTouch. Here is a preview
of it creating an account in Dynamics CRM using the
MonoTouch C# library. We're creating this to speed up
development of xRM solutions that can leverage the power of
touch based mobile devices as well as the Dynamics CRM
platform.
Challenges so far...
MonoTouch doesn't support web services natively yet,
therefore we had to use the HttpWebRequest class to make raw
calls to the crm web service. We also had to duplicate
Request, Response, CreateRequest, CreateResponse,
TargetCreateDynamic as well as all Dynamics CRM specific
data types (CrmDateTime, CrmDateTimeProperty...etc).
Sample Code
// IFD not supported yet
CrmAuthenticationToken token = new CrmAuthenticationToken
{
AuthenticationType = 0,
OrganizationName = "MagnetismLimited",
CallerId = Guid.Empty
};
CrmWebRequest sdk = new CrmWebRequest("http://virtualcrm03/mscrmservices/2007/crmservice.asmx",
"MAGNETISM", "Administrator", "h3rew3g0", token);
// only difference here is that entity.Properties is an array instead of type PropertyCollection
DynamicEntity entity = new DynamicEntity("account");
entity.Properties = new Property[] {
new StringProperty("name", accountName),
};
TargetCreateDynamic target = new TargetCreateDynamic { Entity = entity };
CreateRequest cr = new CreateRequest { Target = target };
CreateResponse response = sdk.Execute(cr) as CreateResponse;
Console.WriteLine(response.id);
Dynamics CRM SDK for the iPhone is still in its early stages, we plan to release a public beta by the end of October. If you'd like to be part of our test team please contact me.