Related sites:

Newsletter: Perspectives on Power Platform

Company: Niiranen Advisory Oy

Expanding “Add Activity” Options on CRM 2013 Forms

CRM 2013 has introduced many UI features that aim to reduce the number of different windows between which the user needs to navigate while performing everyday actions on records. Since customer relationship management systems are often focused on capturing the various interactions between the company and its customers, activity management is naturally a core feature that should be as smooth as possible in a CRM application.

The refreshed entity forms in CRM 2013 contain the Social Pane (shown as “Notes Control” in the form customization UI due to legacy reasons) that shows three tabs of interaction data related to the record: Activity Feed posts (Yammer posts if available), activities and notes/attachments. In addition to a much richer rendering of the activity content than the previously available subgrids, there’s also an inline control available for adding tasks or phone calls directly on the main entity’s form. This provides quite a slick user experience that makes CRM appear very effortless to use for activity management.

CRM2013_Activities_1

What’s missing from the Social Pane then? Well, for starters, not all the activity types are available to be created via the Add buttons on the top of the control. We have phone calls & tasks available immediately, clicking the ellipses (…) button gives us email & appointment, and if we’ve added any custom entities into our solutions they’ll be presented here, too. However, if you’d want to add any of the other default activities for the record you’re working on, meaning a letter, fax, recurring appointment or a service activity, then you’re out of luck. The user would need to navigate away from the form by selecting the Activities menu from the Nav Bar, create a new activity record from there, find the Regarding record to reference on the activity, save it, then return back to the original record.

Another limitation has to do with the inline editing experience of tasks and phone calls. When you create a phone call via the Social Pane, it will always be record as a completed activity. So, no chance for planning upcoming phone calls and setting up a reminder, unless you record it as a task instead. Another downside of the inline form is that it’s not customizable, which means we can’t display any custom category fields related to a phone call or task. When implementing a CRM system for tracking the activities of sales people and account managers, it is a very common requirement to have some compulsory fields added onto the activity entities that the user must fill to categorize and describe the activity before being able to complete it. Well, since the inline form will log a completed phone call right after clicking on OK, this isn’t exactly the optimal feature for those scenarios.

Ribbon to the rescue

While some parts of the new UI are not yet customizable in CRM 2013, we do still have a way to introduce additional features onto the entity forms via the Rib… sorry, Command Bar. Even though in its default setup the Command Bar looks like a stripped down version of the CRM 2011 Ribbon, it’s still built on the very same  Ribbon XML definitions and it supports most of the features from its previous incarnation. As we know, CRM in itself doesn’t provide tools for configuring the contents of the Ribbon, which is why someone just had to do something about it. That “someone” is CRM MVP Scott Durow and the “thing” is his awesome Ribbon Workbench solution that gives us everything imaginable for customizing the CRM 2011 Ribbons as well as the CRM 2013 Command Bar.

Since many of the common features presented on the CRM 2011 Ribbon get hidden away once the CRM environment is upgraded to 2013, Scott has been covering several scenarios in his blog where this functionality is restored onto the Command Bar. Among these articles is a tutorial on how to restore the Add Activity buttons into a CRM 2013 environment. By following these steps documented by Scott we can enable the creation of letter activities while on an entity form, as well as provide a navigation path to opening the full form of a phone call activity to control the business required fields as well as activity status beyond the options that the Social Pane inline activity form gives us.

To demonstrate the possibilities of modifying the default activity management features of CRM 2013, I decided to take Scott’s example and expand it a bit further. In his blog post Scott shows you how to make the activity buttons appear on the Command Bar, but due to the limitation of max 5 items being shown directly on the form and the rest being pushed away into the “more actions” menu, it’s not going to be very easy for the CRM user to discover their existence. What I did instead was add a new flyout menu, promote it to the top 5 items on the Command Bar and arrange all the “Add Activity” buttons inside it. The screenshot below shows how this has been configured while in the Ribbon Workbench UI:

CRM2013_Activities_RibbonWorkbench

How do we get the buttons to do what we want them to do, meaning creating new activity records like they used to in CRM 2011? Scott’s blog post contains all the details you need for making this happen, but since the inherent complexity of the Ribbon XML language can make it challenging to grasp how the various options relate to one another (I’ll be the first to admit I struggled quite a while with the task before being able to achieve the result I wanted), I’ll recap the main steps here for your convenience.

First of all, we’re not creating a completely new command but rather customizing a native CRM platform command. While the activity buttons aren’t visible on the Command Bar by default, they do exist in the Ribbon definition and can be accessed in the Ribbon Workbench by switching from the Command Bar tab to the Ribbon tab (bottom left corner of the top menu) and navigating to the Form ribbon (since this is where we want the flyout menu to appear in our example). You’ll see the familiar Ribbon in the format that it would be shown, with the Activity buttons available under the Add tab. Yeah, not too many end users probably ever discovered that second tab of the ribbon on their own, which is why the simplified design of CRM 2013 is definitely a step in the right direction, even if it means us consultants need to do a bit more tweaking of the system to enable the relevant features.

CRM2013_Activities_RibbonWorkbench_2

Anyway, now that we’ve found the buttons, we can right-click on them and select “Customise Command”. Effectively what this does is it brings the commands like Mscrm.AddPhoneToPrimaryRecord available for us to reference in the custom buttons that we create. While we’re at it, we can also re-use the icons and labels from the native buttons in our custom flyout menu buttons. The one thing we need to change, however, are the Display Rule settings of the now customized commands, as the Mscrm.HideOnCommandBar rule would otherwise do just what it says and hide the buttons from our flyout menu when viewed on a refreshed UI form.

As mentioned, please refer to the original blog post to guide you through the detailed configuration of the custom buttons. It will give you everything except the different layout, which is the flyout menu that you can see below. In practice this method allows us to create up to five traditional dropdown menus on the form’s Command Bar. We now have a button labelled “Add Activity” that will open up a list of different activity icons, which in turn will lead the user to the traditional full create form for the chosen activity type. It will pop open in a new window, allow the user to edit the details, then close the window and return back to the parent entity form. Just like in the “good ol’ times” of pre-2013 Dynamics CRM.

CRM2013_Activities_2

If you took a closer look at the flyout menu shown in the picture, you may have noticed one non-standard entry at the end of the list: Site Visit. What’s that? And why’s it under a menu section called “Quick Actions”? Thanks for asking, let me explain what it’s all about.

One automated step further

Making the standard Create buttons available in the Command Bar can surely be helpful if the users need to be able to perform actions that the new CRM 2013 Social Pane doesn’t provide. But why stop there? Instead of just giving the users more options, why not give them smarter features instead? If you have a business process in place that requires the users to enter information in a highly structured standard format, then the best way to ensure that the correct procedure will be followed is to reduce the number of possible missteps that the user might take while navigating in the standard CRM application menus and filling generic activity forms.

Dynamics CRM has a built-in feature that can be used for guiding the user through a controlled path of data entry tasks: Dialogs. These are in practice interactive workflows that allow you to present questions and collect answers from the user, execute custom business logic in the background, query data from other records in the CRM database, present conditional screens based on the answers & data, etc. In many ways they are a much more powerful feature than the new Business Process Flows in CRM 2013 if you’re trying to automate complex processes, but they have one significant shortcoming: they are buried behind an unintuitive Dialog menu that very effectively conceals their true power from the wider audience of CRM users in most organizations. Compared to the highly visual Business Process Flow component, they occupy a tiny fraction of the UI space and as a result tend to get forgotten while considering the different customization options of Dynamics CRM.

Since we’ve already opened up the Ribbon Workbench and injected a custom flyout menu into the Command Bar, we can take advantage of this same customization and add a button that will directly launch a dialog process for the current record. This is not a feature you’ll find directly in the Workbench, but it’s not very complicated to implement if you’ve come this far already! As always, Scott Durow has covered the necessary steps in an article: Create a Dialog Short-Cut Ribbon Button.

What we’ll need is one JScript web resource in our solution, for which we can copy the code from Scott’s article. Then we need to find the GUID of the dialog process, which can be grabbed by running it on a record via the standard Dialog menu, opening it in a new window with Ctrl+N and copying the ID from the window URL. Since this dialog launcher is not a standard CRM command, the custom button needs to be linked to a custom action that is described in detail in the article. The only thing we have to decide for ourselves is what to call the button, the tooltip title and description text we want to show to a user hovering over the option and, of course, the most appropriate icon to cover our button placeholder image with.

CRM2013_Activities_4

In the example above we’ve linked the Site Visit button onto a dialog process that will collect information regarding an appointment record that gets created at the end of the process. This allows us to present the required fields in a logical order, as well as show tip texts alongside the field to further guide our users on entering the right information and selecting the appropriate options. The example dialog contains a selection on the follow-up actions necessary for the site visit, which in turn will execute more workflows in the background depending on the value selected: either creating a follow up task automatically or escalating the issue to the manager of the related account.

Considering the standard inline activity creation forms of the new CRM 2013 Social Pane are very well suited for a quick capture of unstructured notes, the dialog process represent the other end of the spectrum with their ability to enforce a well defined process for data entry. Depending on the use case, each approach can definitely help in delivering a user experience that makes it easier for the user to complete the task at hand in an effective, effortless manner. When designing a Dynamics CRM solution it is important to have a clear understanding of the circumstances in which a feature like activity data management will be most commonly used and choose the right tool for the job.

24 Comments

  1. Hey Jukka, thanks for posting this way back when. Super easy once I saw the visual you created.

    Cheers,

    Joe

  2. good blog . i can see how can manipulate the add activity flyout menu . I am trying to remove an item ‘fax’ form the add activity – ive installed ribbon workbench on my system but i cant seem find the items . if i export and reimport a solution and use workbench on that – what component/s do i need ?

    • Geej, it should be enough if you just include the entity from which you wish to remove the fax activity button. If you don’t see the button there in the Ribbon Workbench UI, perhaps you are looking at a different Command Bar or Ribbon, not the one that’s applied to the Form?

  3. Hi

    This may be a stupid question, but how did you re-arrange the activity buttons under the fly-out menu?

    //Nick

    • Nick, if you right-click on the menu in the Ribbon Workbench there are options for “Move Up” and “Move Down” that allow you to set the order of the buttons.

  4. Hi Jukka

    Thanks for the quick reply and great post.
    My problem is getting the different activity buttons onto the fly-out menu.
    When I “enable” the buttons using the crm 2011 form in ribbon workbench, the activities gets listed under the “elipse”.

    Then I assume I should add a custom fly-out menu, and move the buttons to this menu.
    Or did i miss something?

    Best Regards
    Nicholas

    • Nick, what I’ve actually done in this example is to create new activity buttons instead of the original ones. By clicking on the “Customize Command” option the commands from these original buttons become available to be applied onto brand new buttons that you can add to the new flyout menu just by right-clicking in the correct place. For example, when I’ve customized the Phone Call button the Mscrm.AddPhoneToPrimaryRecord command has become available in the Ribbon Workbench UI. So, I just reference that in the Behaviour – Command field of the ButtonControl Properties pane on the right when I’ve highlighted my new button.

  5. Hello Jukka

    Thanks for the help earlier this year. I have a problem with my Incident entity . I have added a sub grid of activities which works fine . However each sub grid some with a plusd sign which i want to remove for this particular form .

    Ive loaded my solution , opened my entity ( which happens to be the incident entity ) but i cant locate the right command in the sub grid section . i see add new add new activity , add existing add existing activity but customizing buttons ( for the purpose of identification ) doesn’t seem to work with these sub grid commands .

    Basically i want to remove the plus buttons from selected sub grids

    can you advise ?

    Many Thanks

  6. ok thanks for that . Im also getting the impression you cant remove activities from the sub grid menu – weird isnt it ? Ive resorted to adding a default blank form for the entities i want to hide with a warning telling the visitor that the feature in question is not in use. – oh well

    on another matter do you know how to spruce up the forms within CRM 2013 ie. using css ?
    I know they exist because you can manipulate in firebug but i dont know how to make permanent changes.

    I wish there some simple templates you could use – the white minimalistic approach gets a little bland after a while

    Pity there isn’t formatting in ribbon workbench to make certain fields bold or a certain colour

    many thanks

    • Geej, Dynamics CRM does not support any CSS modifications. You may find some tips on unsupported CSS tweaks on the Internet, but it’s good to be aware that sooner or later these type of UI changes done via scripts will break when the underlying application gets an update.

  7. hi
    is it possible to filter the activities shown on the account forn?
    i have a custom activity that i don’t want to show here/

  8. Hi Jukka
    i’m sory but i didn’t understand your answer.
    perhaps i should explain myself better. in your post you showed an account. on the right-hand-side of the account form you have the “social pane” which shows al the activities related to this account.
    i have a custom activity and it is showing with the other activities (phonecalls ,letters etc)/
    my question is : is it possible to filter the activities so the custom activity will NOT show there?
    thanks
    Doron

    • Doron, as this post was about the options for showing buttons to add related activities to a record, I assumed your question was also related to this topic. If you need to hide specific records from a view used in a system component that doesn’t offer the selection of custom views (like Social Pane), then I believe your only option would be to write a plugin that filters these records whenever a RetrieveMultiple request is issued to the platform. Here’s one blog post that outlines the approach for developing such a filter: Using Plug-Ins To Modify Views.

  9. hi Jukka
    thanks for all your help.
    i wrote the plugin you according to the example but the plugin is not triggered on openning the account form, only on advanced search of activities.
    to which message of which activity should it be linked?

    • Doron, I’ve never written a plugin myself, so you’re better off asking this question from a developer. Googling for the terms “crm retrievemultiple activities” seems to provide some relevant threads, which hopefully give an indication of what to try next.

  10. Hi Jukka,

    thank you for this greate article. It helped me a lot. There’s only one thing left I’d like to change: The icons itself. I know this is pretty easy if you have the wanted icons. But I don’t know how to get the original CRM 2013 icons for fax, letters, etc.
    Maybe you can give me a hint?

    • Florian, if you want to leverage the standard icons for CRM entities and menus outside of their original context, then one way would be to look them up from the directories on the CRM application server.

  11. Hi Jukka,

    Very helpful post.
    Can I hide the completed status of phone call from social pane?

    • S, I’m not aware of a supported way to either modify the contents of records shown on the Social Pane, nor filtering out records from it. If you must build a custom view on activities related to a record, then one option would be to look at how the query of a standard subgrid view could be manipulated via a plugin + some custom FetchXML query definitions. This article from Jonas Rapp is a good place to start exploring this option.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.