web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to add a custom button to Sub-grid View?

(0) ShareShare
ReportReport
Posted on by

Here's the subgrid view on Account form.

I need to

1. Add a custom button on to left of "+" button and add JavaScript to the click event.

2. Customize the behavior of the "+" button so that I can use "Xrm.Utility.Openentityform" to control the opened form.

Is it possible to do either of them?

Thank you!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Deeps Profile Picture
    1,875 on at

    No

  • Verified answer
    NatrajY Profile Picture
    3,040 on at

    This is not possible OOB. The only way this could be done, is using Scott Durow's SparkleXrm project. But this involves custom code development. If you are happy to head this route, have a look at the samples in www.sparklexrm.com

  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi,

    I am sure that we cannot add custom button on the left of + for subgrid, because we tried it before.

    But, for the second thing:

    2. Customize the behavior of the "+" button so that I can use "Xrm.Utility.Openentityform" to control the opened form.

    I am not sure that this is impossible to do.

    Because if we take a look in this link:

    http://garethtuckercrm.com/2013/11/19/fixing-the-sub-grid-user-experience-in-crm-2013/

    Gareth shows us how to 'modify' the behavior of + button by hiding the 'Add Existing Button',

    maybe you can try using RibbonWorkbench created by Scott to customize the New or Add New button:

    I also curious, I think it is possible to modify the behavior like what Gareth found for Add Existing one.

    Hope it helps!

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    Although you cannot add new buttons to the subgrid command bar - you can customise the behaviour of the buttons by customising the command or customising the button and wiring it up to a custom command.

    Hope this helps,

    Scott

  • JVE Profile Picture
    213 on at

    Documentation for Subgrid ribbons to the help to support what others already said:

    You can change the default behavior by changing the actions associated with the command using <CommandDefinition> (RibbonDiffXml), but you cannot change the name of the command. For example, you could change the delete action so that it deactivates the record rather than deleting it.

    It is not possible to change the icons displayed for these commands. You can hide these commands by using <HideCustomAction> (RibbonDiffXml).

    And on Command bar or ribbon presentation:

    Subgrids have a limited number of controls. Only controls to allow adding records, deleting records, or opening a view of the grid are available. But these commands are still defined by ribbon data and can be customized.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans