« Home | Sql Injection Tracking Tool » | Using LogParser to get Download Details from IIS » | Getting IP Address and ISP name of our Web Page Vi... » | Error Handling in Web.Config » | Handling Application_Error Method » | Error Handling in .net 3.5 » | Using LINQ in String Collections » | SQL in .net Using LINQ » | Querying the DataTable in .Net » | Converting DataView into DataTable »

Dynamics CRM 4.O SDK for IPHONE

Dynamics CRM 4.O for Iphone is on the way. The developers 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. They are 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.



As MonoTouch doesn't support web services natively yet, therefore they had to use the HttpWebRequest class to make raw calls to the crm web service. they 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, public beta will be released by the end of October.

Post a Comment