Sonoma Partners Microsoft CRM and Salesforce Blog

Activity Tracker – Microsoft Dynamics CRM Mobile Samples

Today’s post is co-written by Kyle Gerstner, a Principal Mobility Architect at Sonoma Partners.

With the rush of the holidays, you may not have noticed that the Microsoft Dynamics CRM team released a new set of sample mobile code that demonstrate how to connect and interact with Dynamics CRM from Windows Phone, Android and iOS devices.

Microsoft asked Sonoma Partners to create a sample code solution specifically for iOS and Android developers. In these discussions, we wanted to showcase more than a simple mobile example connecting CRM. We believed we could come up with a quick, easy to understand reference application that leverages the code samples mobile developers would use in common applications, but also be immediately valuable to the user community. Our key solution tenants were:

  • Provide framework for custom mobile applications
  • Phone-based application
  • Simple & common use case
  • Stand-alone reference application
  • No CRM solution changes required

We focused our use case on something every mobile user can appreciate: the ability to quickly find a contact’s details and record an interaction with that person. The results are the Activity Tracker phone sample application!

image

While we focused on the iOS and Android versions, Microsoft developed the Windows Phone in parallel, providing you the code to natively work with whichever device makes sense for your organization.

This starter application code was designed for mobile developers looking to get started with Dynamics CRM for the first time, as well as seasoned Dynamics CRM developers. Activity Tracker demonstrates how to find a contact and submit one type of activity interaction (a check-in task). However, the code is open source, so you have a framework to easily add additional activity types, brand the application to your color scheme, and also add additional entities (such as account and opportunity). You can also look to extend the use case slightly for more advanced scenarios.

To demonstrate, we have extended the application for our internal use to bring back tweets from a contact. We simply added a ‘Twitter Handle’ field to the contact form and use that to make a call to Twitter, retrieving all public tweets associated with that twitter handle. As you can see from the screenshot, we also altered the design of the activity history to use a horizontal scroll, for better usability with more information sources.

 ActivityTracker_TwitterContact

The Microsoft team also has demonstrated extending the application. They have a sample that enhanced the Windows Phone example to use Cortana – bringing the power of voice commands to your CRM data entry!

From a technical perspective, the samples show you how to connect to both the SOAP and OData endpoints that Dynamics CRM uses. As a mobile developer using Dynamics CRM, you will probably use both endpoints in your custom applications.

The OData endpoint is a more common approach for connecting mobile applications, and is the primary approach taken in this sample. For example, we use OData to fetch details of the contact and get the recent records list, which comes back in an easy-to-consume JSON format. However, not all of the Dynamics CRM API methods are currently supported with OData. One example of this, is using the Execute method which was needed to mark an activity as completed. Hence the need to also demonstrate how to interact with the SOAP endpoint.

We also made use of Microsoft’s ADAL library for Objective C and ADAL library for Android, which uses OAuth to authenticate the user to CRM. Like many mobile applications, this means your user authenticates from their appropriate authentication endpoint, with the credentials they already know and commonly use.  More importantly from an application development perspective, the custom application does not need or has access to your username and password. The OAuth model gives the user and system administrators the ability to revoke access if a device is lost or an employee leaves the organization, helping to further reduce the security risks generally associated with mobile applications. 

We believe these mobile samples will allow you to more quickly deploy a customized mobile application for your organization and make your mobile workforce more efficient and engaged.

Ready to mobilize your workforce? We can help. Contact us to learn more about mobile CRM applications for your business.

Topics: Enterprise Mobility Microsoft Dynamics CRM 2015 Microsoft Dynamics CRM Online