Phone Apps released for Microsoft CRM 2013

Microsoft have released their first ever mobile phone apps for Dynamics CRM.  Here’s the iPhone app:

image

There are distinct apps available for Windows Phone, iPhone and Android.  These are native apps that need to be installed from each vendor’s respective app store.

You can view, edit and create new records.  There is support for views and forms and viewing and editing of related records. 

Looks to be no offline support, not even the recently viewed records like on the tablet (just read you get this in the Windows Phone app only).

You can click to call on a phone number, click to email on an email address and click on a URL to pop the browser.  In all 3 cases you leave the app though so have to navigate back to it once done.

One cool feature is you can attach photos from your mobile device’s camera roll to a CRM record via a click of a button:

 

A massive improvement over Mobile Express but it still leaves room for products like Resco and CWR Mobility (e.g. offline support, extensibility, hundreds of little features).

More details available here:

https://community.dynamics.com/crm/b/crmteamblog/archive/2013/11/20/microsoft-dynamics-crm-for-phones.aspx

From a configuration perspective your configure this app the same way you configured Mobile Express in the past.  There are Mobile Forms in the CRM solution editor:

image

And the default public view is what renders on the mobile device (the first 2 columns at least).

To enable/disable entities for mobile support there is a property on the Entity record (which you can both check and uncheck):

image

When making configuration changes make sure you kill the mobile app on your device in order to pick up the new changes.

I did a quick test and Business Rules don’t appear to fire, which suggests JavaScript won’t fire either. Makes sense, as you can’t associate either of these to Mobile forms.

One minor annoyance with the Mobile apps at the moment is you can’t reconfigure them to point at a different Org.  To do that, you need to delete the App and reinstall it.  Well, that’s one way to notch up a lot of downloads I guess!  😉

Advertisements

CRM 2013 New Features: New Menu Experience

Gone is the traditional left hand navigation pane, now we have a top menu that admittedly takes a little getting used to:

Out with the old:

image

And in with the new:

image

At first glance the menu doesn’t feel that intuitive.  For example to switch Areas you click on the Microsoft Dynamics CRM dropdown:

image

This seems strange to me.  But then again, in my experience most customers use CRM for only one functional area and I have commonly ditched Sales, Service and Marketing and replaced with a single custom area named something like “CRM” or “Home” – whatever looks good in the UI.  So I expect it will be common for users to not need to switch Areas making this peculiar user experience irrelevant.

Next level of navigation is to pick a menu item from within the selected Area (i.e. pick Opportunities from the Sales Area).  Here you click on the SALES dropdown, to pick the child menu items that belong under that Area:

image

It will be common for the number of menu items to exceed the width of the window, so the user will need to use the arrow on the right to scroll across:

image 

The Groups that we are used to from the SiteMap are still there, they appear as subtle headings above the first menu item in each Group.  Not sure I see any value in these now:

image

Editing of the new menu is done the same way as it was before, either manual XML editing of the SiteMap or via a third party SiteMap editor.   

Let’s try trimming the menu down and see if we can’t make the menu a little more intuitive.  I gave Microsoft’s Site Map Editor a whirl and it seemed to work just fine against CRM 2013.  I created a “MAIN MENU” Area and placed my menu items there and then deleted the Sales, Service and Marketing:

image

This approach results in what feels like a more intuitive user experience to me:

image

With the user accessing menu items from the MAIN MENU dropdown:

image

Its going to be interesting to see what sort of Site Map configurations work best in CRM 2013.

CRM 2013 New Features: JavaScript Notifications

CRM 2013 come with a set of new JavaScript functions that we can use for sending notifications to the user.  There are form notifications and field notifications.  Here’s an example of a form notification at work…

The function below was registered on the OnSave event of my form.   It notifies the user that a Save has occurred and timestamps the notification.  I post 3 notifications to demonstrate the 3 different types available (error, warning and information):

function NotifyOnSave() {
    var today = new Date();
    Xrm.Page.ui.setFormNotification('Error! A Save occured at ' + today, 'ERROR');
    Xrm.Page.ui.setFormNotification('Warning! A Save occured at ' + today, 'WARNING');
    Xrm.Page.ui.setFormNotification('Information: A Save occured at ' + today, 'INFORMATION');
}

Here’s what appears after the Save:

image

Now, if I make another update and then let another Save occur this is what I get:

image

It’s a little hard to tell on the screenshot but what has happened is each of those 3 notifications has been posted a second time to the form (note: the UI only shows 3 rows of notification, the user has to scroll down to see the other 6 notifications).  The Information notification appears twice due to the sort order applied by the UI:  Information notifications first, then Error notifications followed by Warning notifications.   This is the default behavior  of setFormNotification().   We have options though, we can assign each notification a unique ID and then we can overwrite a previous notification and avoid duplication in a scenario like this.  Here’s the revised JavaScript (note the unique ID added as a 3rd parameter):

function NotifyOnSave() {
    var today = new Date();
    Xrm.Page.ui.setFormNotification('Error! A Save occured at ' + today,'ERROR','1');
    Xrm.Page.ui.setFormNotification('Warning! A Save occured at ' + today,'WARNING','2');
    Xrm.Page.ui.setFormNotification('Information: A Save occured at ' + today,'INFORMATION','3');
}

If you want to clear a notification you use clearFormNotification() and you identify the notification by its unique ID:

    Xrm.Page.ui.clearFormNotification('1'); 

We also get field notification in CRM 2013.  The syntax for these is:

Xrm.Page.getControl(fieldName).setNotification(message);

Here’s an example where I have added a SUBMIT FOR APPROVAL button to the Command bar on a CRM form and have added JavaScript validation to that button that generates field notifications if certain mandatory fields have not been populated.   Here’s the JavaScript:

function SubmitForApproval() {
    var AlertRequired = false;
    if (Xrm.Page.data.entity.attributes.get("new_unitamount").getValue() == null) {
        Xrm.Page.getControl("new_unitamount").setNotification("Unit Amount must be entered in order to submit for Approval");
        AlertRequired = true;
    }
    else {
        Xrm.Page.getControl('new_unitamount').clearNotification();
    }
    if (Xrm.Page.data.entity.attributes.get("new_qty").getValue() == null) {
        Xrm.Page.getControl("new_qty").setNotification("Qty must be entered in order to submit for Approval");
        AlertRequired = true;
    }
    else {
        Xrm.Page.getControl('new_qty').clearNotification();
    }
    if (Xrm.Page.data.entity.attributes.get("new_linetotal").getValue() == null) {
        Xrm.Page.getControl("new_linetotal").setNotification("Line Total must be entered in order to submit for Approval");
        AlertRequired = true;
    }
    else {
        Xrm.Page.getControl('new_linetotal').clearNotification();
    }
    if (AlertRequired == true) {
        alert('Missing information, please clear all alerts');
    }
    else {
        alert('Submitted!');
    }
}

And here’s how it looks when I test with missing data.  First the Alert fires…

image

And then each field that failed a non-null test is flagged with an Alert icon and the notification text is displayed:

image

This starts to look a bit ugly when you generate notifications for neighboring fields:

image

The notification text goes away once you mouse over the message, but the alert icon remains:

image

I wondered whether I could leave out the notification message and just get the alert icon to appear by just saying:  Xrm.Page.getControl("new_unitamount").setNotification();

Unfortunately, the notification speech bubble still appears so this is not a good approach:

image

I like the form notifications.  I would try to minimize usage so that no more than 3 form notifications ever appear, any more and they just aren’t visible enough. 

I’m not sure I like the field notifications.  I like the fact I can highlight fields with issues but I don’t like the notification speech bubbles that appear.  I guess it works well so long as notifications don’t appear for adjacent fields.  I would give this some consideration when deciding how to layout the fields.

CRM 2013 New Features: Quick View Forms

This is perhaps my favorite new feature in CRM 2013.  It is common for customers to want to see Contact details such as Phone Number and Email Address on ‘transactional’ forms such as the Case and Opportunity forms.  Previously we had three options to address this:

  1. Do nothing, train that users should click on the Contact to pop the Contact form to view those details
  2. Create custom fields on the Case / Opportunity form and duplicate / synchronize the data from the Contact record
  3. Embed an HTML web resource on the form that dynamically retrieves and displays this data  

Quick Views now provides a no code equivalent to #3 which looks like this:

image

I’ll demonstrate some creative uses of this new feature in a second but first here are the basics…

The Quick View form is configured using the CRM form editor just like you would a normal form:

image

You are however constrained when it comes to the form layout, you get one Tab that can contain only single-column Sections – i.e. you are configuring a single column form:

image

You can insert multiple Sections though and each Section can have a Label and can contain Fields, Spacers or Sub-Grids:

image 

Now onto some design scenarios you might not have considered yet…

You can chose to render Sub-Grids as Charts and add some visual interest to your forms.  In the below screenshot whilst the user is looking at an Opportunity they get a handy visual indicator of the Account’s open Opportunities and active Cases:

image

You can use a Quick View Form to add contextual help to a CRM form.  This is my bright idea of the year, I think this is very cool and I look forward to utilizing this on a project. Imagine you have multiple types of Opportunities and each Type has different considerations that we want to communicate to the user.  We could create an Opportunity Type entity and place a corresponding lookup field on the Opportunity form.   On that Opportunity Type entity we can populate some guidance into some custom fields and then use a Quick View Form to display those fields on the Opportunity form once the Opportunity Type is  selected.  That gets us a user experience like this:

image

The experience is immediate, the Quick View Form renders / changes on change of the lookup field. 

I have placed the Quick View Form on the right side of the form, you could also place it beneath the lookup field:

image

One concern I have is the Quick View Form seamlessly integrates into the CRM form so there is the potential for the user to be confused and think these are editable fields.  Placing the form on the right helps address this.

Anyone else have any creative ideas on how we can leverage this new feature?

Using Business Rules for Calculated Fields in CRM 2013

Business Rules are a viable alternative to JavaScript for basic field calculations, such as the below example where I want Line Total to be calculated based on Unit Amount x Qty:

image

To automate this simple calculation I configured 3 Business Rules.  Firstly, the rule that sets Line Total =  Unit Amount x Qty (when both those fields are populated):

image

And two additional Business Rules to clear the Line Total field once either of the input fields are cleared:

image 

And:

image

I describe this as a JavaScript replacement and it is.  However, that doesn’t mean either JavaScript or a Business Rule is the right solution to this automation requirement.  They both have the same weakness, they only fire when the data is changed through the CRM form.   Understanding when Business Rules fire is easy, just think of them as JavaScripts.  Behind the scenes the Business Rules you author are translated into JavaScript so there really is no difference.    Implementing a calculation via just a JavaScript or Business Rule leaves your data integrity exposed to updates via Bulk Edit, Data Import, Mobile Express, API and Workflow updates where updates to your fields won’t trigger the recalc of the calculated field.   For that reason, I would meet this requirement with a combination of a Business Rule and a Plug-in.  The Business Rule provides a real time calculation experience for the user, the Plug-in ensures the calculation happens regardless of the source of the update.    Wondering whether a simple Real Time Workflow could do the job of the Plug-in?  The answer is no, the workflow designer doesn’t provide the ability to define this type of calculation.

A few other things to know about Business Rules…

Once a field is referred to within a Business Rule that association becomes part of the field’s properties, visible from the form designer:

image

  • When setting a field value you can only draw from fields of a similar data type.   In the example above I was able to set a Currency field based on a  Floating Point field and another Currency field.  But if I want to set a Text field based on an Option Set or Lookup field I’m out of luck.
  • When setting a field you can’t draw on any context information such as the current user or current date time.   I tried to workaround this be setting fields based on Modified On and Modified By but those values are only as current as the last save so are do not reliably give you ‘now’.

CRM 2013 New Features: Business Process Flows

With CRM 2013 Microsoft have introduced the biggest user experience change yet, the process-centric UI:

image

For those of us that design solutions on Microsoft CRM this is where I think we need to spend the most thinking time as we study up on CRM 2013. 

In this post I’m going to walk you through the creation of a custom Business Process Flow and help explain how cross-entity flows work. 

 

Here’s my scenario, I need CRM to support the sales and delivery process for an IT Company that implements software.   The company’s primary business processes are in Sales and Delivery.   Traditionally they have tracked Opportunities and Projects in their CRM system and these have been quite disconnected experiences.   Their goal with CRM 2013 is to have a more integrated and consistent user experience where the system supports the process from opportunity qualification through to delivery of the project.   This integrated process looks a bit like this:

image

So, my plan then is to utilize CRM’s “Opportunity” entity and a custom “Project” entity.  I will surface a process centric UI across these 2 entities using the Business Process Flow feature in Microsoft CRM 2013.

Let’s jump straight to the interesting bit and have a look at the Business Process Flow configuration.   We access this from the Processes area in CRM (where we have historically configured Workflows and Dialogs).  The first thing I need to do is disable the existing Business Process Flows that exist for the Opportunity entity.   There are 2 that come OOTB, I need to do an “Add Existing” to pull these into my Solution and then deactivate them, otherwise they get in my way:

image

Now I can create my new Business Process Flow:

image

I define the Stages that relate to the Opportunity record and list the fields I want grouped under each Stage:

image

Next I add the Project entity and the Stages that relate to that entity.   I click the +/- icon and select the Project entity.   Here the UI offers the 1:M related entities for Opportunity that have been enabled for Business Process Flows (there is a new setting on the entity record for this): 

image

Now I define the Stages and select the fields I want for each Stage:

image

And this is how this all looks once I Activate the Rule and try it out on a new record:

image

Now what’s important to understand is at no point there did I configure the automatic generation of a Project record.  If you are looking for that functionality within the Business Process Flow editor I’m afraid I need to reveal it doesn’t exist, the Business Process Flow will not create a Project for you.   You have 2 options, either you utilize something like Workflow / JavaScript / Plug-ins to generate the Project once a certain event occurs, or, you leave it to the user to create the record as they transition Stages.   Let me show you what that second option looks like to the user…

Back on the Opportunity form the user will populate the fields for each Stage and then click the Next Stage button to move forward in the process:

image

The flag icon moves to the next Stage and the fields for that Stage become visible:

image

When the user gets to the Stage transition that spans the Opportunity and Project entities the user experience changes, the user is prompted to select a Project record.   CRM needs to know which Project record to continue on with.   If we haven’t programmatically created the Project record for the user there will be no child Project records to pick from and the user will need to create one on the fly.  Fortunately, this just takes a click:

image

And the UI is refreshed and the Project form displayed.  The process chevron remains providing consistency to the users.  Any new data captured from this point on writes to the Project record:

image

If you prefer to create the Project record for the user you can do this easily with a Real Time Workflow.   Below I have configured a workflow to trigger once the “Contract Signed?” field is set to “yes” (it needs a Save to fire though so keep that in consideration when using real time workflows, they’re still not as immediate as JavaScript:

image

With this enabled, clicking Next Stage to move from Close to Discovery will offer up the automatically created Project record to the user to select:

image

So the user experience doesn’t really dictate the need to automatically create the Project record, you just need to consider how you will default any values on the record if you don’t create it programmatically.   The relationship field mappings will help you out a little there.

Another area of consideration is whether you need to close out the Opportunity record.  Again the Business Process Flow definition won’t really help you but Workflow, JavaScript and Plug-ins will.

I find the out-of-the-box experience of the Lead to Opportunity process a little disjointed in this area.  In order to progress the process you need to use the Command bar and Qualify the Lead.  I don’t like that.   In my solutions I will endeavor to keep the user in the Process chevron so they all they need to do is complete fields and click Next Stage.

 

One last thing, in the Business Process Flow designer you can ‘close out’ the process cycle:

image

But all this does is allow you to define additional stages in your process where an earlier entity resume focus again (in my case this would be the Opportunity entity).  If you do this, you cannot go any further with the process – i.e. you cannot add any additional entities, it is intended for the last steps in the process.   Returning to and updating the Opportunity doesn’t make sense in my scenario but imagine you want a process flow that starts with Case, jumps into Appointment and then returns to Case.   That might make sense in a scenario where Cases are captured for on site service requests, a technician goes out and then the Case is closed out.

That’s it on this topic.  Hopefully this helps with your understanding of Business Process Flows.  If you have any insight add please share via the Comments below.  🙂

CRM 2013 New Features: Business Rules

One of the new toys we get with CRM 2013 is the first release of Microsoft’s Business Rules engine.   Think of this release as a configuration-based replacement for basic field manipulation javascript.  

You get a simple UI where you can define Business Rules that will be executed by the CRM form’s OnLoad and OnChange events.  The rules are defined within each entity inside your solution file:

image

Each rule is comprised of Conditions and Actions (and there is a space to include some comments).  Here’s an example:

image

The Conditions are similar to what you will be used to with CRM’s workflow designer but Microsoft have taken a different approach to the configuration experience. When evaluating fields in your conditions you can check for nulls / not nulls and you can compare the entered value with a hard coded value, a calculated value or with another field:

image

The actions available are primarily related to fields:

image

You can also write Business Rules that perform validations, block record updates and display errors the user.  Here I tell the user off once they enter an Est. Revenue value:

image

This surfaces in the UI as follows:

image

Other things to know:

  • The rules need to be activated before they take effect (similar to workflows)
  • You can specify whether the rule applies to all forms or specific forms
  • The rules fire in the new mobile client for iPad and Windows 8
  • The rules are client-side rules, they do not fire during API calls, data import, etc.    Microsoft’s vision is to add that support in a future release.
  • The rules do not support show/hide of Tabs and Sections.  You either need to mention each field individually in your Business Rule or use javascript.
  • If your rule hides a field then CRM moves fields up to close the gap
  • You need to consider the inverse of your rule.  i.e. in my example I tell CRM what to do when the Est. Revenue field contains data.  I don’t tell it what to do when the Est. Revenue does not contain data.  I need to write a second Business Rule for that.
  • JavaScript runs before Business Rules
  • String comparisons are case sensitive

 

Fun feature, I like it!