Fixing the sub-grid user experience in CRM 2013

Microsoft made an odd design choice in CRM 2013 with their new sub-grid design.   By default, when you add a new 1:M sub-grid to a form to display a custom entity you will get the following user experience…

The user clicks the + icon to add a new child record via the sub-grid:

image 

 

CRM reveals a lookup control to allow the user to browse for an existing record:

image

Eek!  Why did you do that CRM?  I want to add a new record, why didn’t you pop the create form?

What’s happening here is CRM  is taking us down the “Add Existing Record” path rather than down the “Add New Record” path.   Think back to CRM 2011 and those 2 buttons you get when you give a sub-grid focus.  Clicking the Add Existing Record used to provide this type of user experience:

image

Now, I was never a fan of the “Add Existing” button in CRM 2011, it was never that useful.  So why Microsoft chose that behavior as the default for custom sub-grids in CRM 2013 is a mystery to me.

Let’s get back to CRM 2013 and carry on with the default user experience.  So the user clicks the + button and the lookup appears.  They don’t want to search for a record but the only thing they can do to move forward is click on the magnifying glass, this executes a search and reveals the lookup control’s search results:

image

Here we can pick a record from the search results or click “Look Up More Records” to pop the traditional CRM lookup window to broaden our search.  I‘m still just trying to add a new child record so these options aren’t of interest.  There is however a new + New button for me, so I’m going to press that.  That gets me to where I want to be, popping the create form so I can create my new child record:

image

Saving that new record automatically closes the form and refreshes the parent form revealing my new child record in the sub-grid:

image

So, we do get there.  But the user experience is not ideal.  Fortunately, there is a fix to this.  CRM chose to push us down the “Add Existing Record” path because this child entity has an “Add Existing Record” button defined in its ribbon XML.  You can see this if you call up the associated view:

image

If we edit the ribbon XML and remove that button CRM will change its behavior and pop the create form as soon as the user clicks the + in the sub-grid.   This is the behavior you will witness in most of the out-of-the-box sub-grids.   See, here’s an Opportunity sub-grid on the Contact form:

image

Clicking the + button pops the Opportunity create form (in this case it is the Quick Create form):

image

If you look at the Opportunity Associated View you will note there is no “Add Existing Record” button:

image 

Back to our custom sub-grid, I want to change the default behavior there.  I launch Ribbon Workbench and call up the Ribbon definition for my Truck entity.  I right-click on the “Add Existing” and select Hide Button:

image

Ribbon Workbench is showing me 2 buttons, I’m not sure why, I’m going to hide both.  Then I Publish the change:

image

And that’s it, an easy fix. 

Here’s the user experience now…

The user clicks the + button:

image

And up pops up the create form:

image

So, an unfortunate design choice from Microsoft but at least there’s a simple no-code fix.

Hope this helps someone.

:)

About these ads

18 thoughts on “Fixing the sub-grid user experience in CRM 2013

  1. You should make the parent lookup field mandatory on the child form if you want this behaviour rather than hiding add existing in the ribbon

  2. Another way of getting around this awkward default behaviour is to make the lookup field business required on the child entity, which effectively does the same thing by removing the Add Existing option. Of course if you need to allow records to exist without a reference to the parent entity then editing the Ribbon is the only way to fix this.

    • Great catch Gareth figuring out that the ribbon xml controls this, and good tip from Jukka as to why the two associated views have a different set of buttons in the first place. I’m going to add that to the train-the-trainer course I am doing today (lunch now, last session this afternoon).

      • Hi Gareth,
        Thanks for your posts on using the Ribbon Workbench – they are very helpful.
        Just thought would clarify a couple of things on this post:
        1. The Reason that there are two buttons is that the first (AddExistingStandard) is the 1:N button and the second (AddExistingAssoc) is the N:N button. To get the behaviour you describe here, you would only need to hide the first button (AddExistingStandard)
        2. The reason that hiding this button changes the inline lookup behaviour to a popup is that the inline sub grid evaluates the display & enable rules of the AddExistingStandard button to determine if it show show the Inline lookup (which is effectively the same as the CRM2011 showing the Add Existing button in addition to the Add New button).
        3. Before you customise the ribbon, I would be absolutely sure that you can’t take the approach that Jukka describes by making the foreign key attribute on the ‘Truck’ entity ‘Business Required’ so that the form sub grid will not show you an inline lookup.

        Hope this helps,
        Scott

  3. Microsoft chose the path they did so that the user would “search” the system to see if the child record already exists before enabling the “Create New” functionality. How many of us face the cumbersome issue of cleaning up duplicate records because users never bother to check to see if the record already exists?

    I have found that once the user understands how the grids are supposed to work, there is really no complaining…and managers love the fact that it forces the search to see if the record already exists.

  4. Pingback: Tried and True CRM 2013 Utilities - CRM Philly
  5. Hi Gareth Tucker,

    I have a requirement to add inline editable subgrid in Opportunity in crm 2013. Is there any possibility to add inline editable subgrid in Opportunity.

    Please help me if you have any information.
    Thanks in advance.

    Regards,
    Nagaraju Padala

  6. Hi Gareth,

    I have a requirement to add inline editable subgrid to Opportunity in crm 2013. Is there any possibility to add inline editable subgrid to Opportunity.

    Please help me if you have any information.
    Thanks in advance.

    Regards,
    Nagaraju Padala.

      • Hi Gareth,

        I too have a requirement to add inline editable subgrid with CRM 2013, but on a custom entity. Is there any way to add an inline editable subgrid to a custom entity?

        If it requires coding, can you help us or do you know anyone who might be able to?

        Thanks and great job on this post.

        Sincerely,
        TZiegner

  7. Hi Gareth,

    I´m trying to do this same modification for a custom activity but it seems that even though I have edited the ribbon for those custom activities (removed the “Add Existing” buttons), I´m still getting the normal activity forms when I click the + button from the form. Also the Quick Create button from the ribbon itself, opens the “normal forms” instead of quick create ones. There is quick create form created and settings on the entity level are also correct, but something in the custom activity seems to be preventing the use of the quick create forms.

    However, in one situation I can access the quick create forms: when “Add existing” functionality for the custom activities is available and I´ll start using the out-of-the-box functionality with the look-up and click the New button from there, then the quick create form for the custom activity is opened.

    Any ideas what to do?

    Thank you already in advance.

  8. Have you had any issues with this solution on ifd deployments? We have implemented your solution as the child entity is ‘task’ and we did not want to make the regarding field of ‘task’ required. Works great on our internal site; does not pop up anything when we access from ifd. It could be IE settings, but I have explored that quite a bit. I find it hard to believe that hiding a button could break the display popup — just curious if you have seen this behavior

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s