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

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

  1. maxpower

    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

    Reply
  2. Jukka Niiranen

    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.

    Reply
    1. ukcrmguru

      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).

      Reply
      1. Scott Durow (@ScottDurow)

        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. Paul

    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.

    Reply
  4. Pingback: Tried and True CRM 2013 Utilities - CRM Philly

  5. ngrj25

    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

    Reply
  6. ngrj25

    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.

    Reply
      1. tziegner

        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. Ilpo Heiskanen

    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.

    Reply
  8. Sandy Devin

    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

    Reply
    1. agusni7361

      Hi Gareth, actually I found this issue and experience the same problem with you, because it is not convenient for us to do click and more click just to create new 1:N records, I also never use the Existing, because actually for transaction or detail data, the existing one is already got relationship with parent, so same, when we choose the lookup record then, also cannot change said that this record already related to another record.

      Okay, then accidentally I found another way to fix it without the ribbon customization. I also did not realize it at the very first time and was confused why suddenly I can open a new pop up after I click the “+”button without any ribbon customization.

      This is what I did actually after I recall again my steps:
      1. Let’s say your parent entity is “Case” and your related 1:N entity as child is “Truck”, I assume this because I see your picture, in your “Truck” form, then in your “Case” you have subgrid to “Truck” entity
      2. Then, in “Truck” entity, you must make the “Case” field (the relationship field) as “Mandatory” or required”

      That is what I have done.
      Anyway, maybe someone has found this solution.

      And btw, I found another issue, maybe you can help find out.
      Let’s say you can open a pop up for Truck entity, can be using ribbon or required field methods, then pop up appears, so then you input your first truck.
      Then, you save, then after that you create New truck under the Case entity (of course it will bring the Case as parent to auto pre-fill “Truck” Case field”, right?) using the “New” button after you save and create your first Truck record, then it should be still in under one parent, but why after I create new then save and new again, the second time is different, the Case field in the Truck entity is not auto-populated.

      Then, I take a look in the URL, actually bring this key :

      http://localhost:5555/dev/main.aspx?etc=10043&extraqs=%3f_CreateFromId%3d%257b67A60DED-09D4-E311-940F-001CC4EECDD6%257d%26_CreateFromType%3d1084%26etc%3d10043%26preloadcache%3d1399284186465&histKey=111732921&newWindow=true&pagetype=entityrecord#108673241

      It brings this ID :
      CreateFromId%3d%257b67A60DED-09D4-E311-940F-001CC4EECDD6%257d%26

      Then, I go to copy paste that URL to new tab or window, and actually it brings back again the “Case” value auto-fill.
      It happens in CRM 2013 if you do create new record from subgrid then save and new again, the second time, did not bring any value from the main entity or parent of that record anymore.

      I have installed CRM 2013 Rollup2, and I tried to create Quote from subgrid on Opportunity form in CRM 2011, also cannot, but somehow another entity also can.
      Any suggestion on this?

      Thank you.

      Reply
  9. Bjorn

    What about Quote and Quote products? Clicking the + button shows Existing Product, Write-in product and Get Products as options. I just want to pop up a Add new quote product form. Any clue how that could be fixed?

    Reply
  10. rule30

    This is a great catch Gareth. On balance I’d tend towards Jukka’s approach but I wouldnt have found that if your hadn’t shared your findings

    Cheers

    S

    Reply
  11. Alex T.

    Gareth, Your site and work has been an inspiration as well as a top resource for me for the last 5 years of working with CRM. Please add a LINK to a new posting from you (above this posting) describing that the only reason the + defaults to searching is because you have NOT made the X:X relationship BUSINESS REQUIRED. All you have to do is make it BUSINESS REQUIRED and defaults to the quick create form.

    Reply

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