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)

Customization of + button of sub grid

(0) ShareShare
ReportReport
Posted on by

Hi

how do we customize so that it should show + button on the sub grid of an entity form and hide "Add new" button on associated grid view.

When I tried to hide the "Add new" button of Sub grid using ribbon workbench, it hides both the + button of sub grid and "Add New" button of Associated grid view.

Requirement :

I need  to show Plus.PNGon sub grid and when navigates to Associated grid view the command ribbon should not show AddNew.PNG button.

Please suggest the possibilities.

Thanks in advance

*This post is locked for comments

I have the same question (0)
  • ScottDurow Profile Picture
    21 on at

    Hi,

    This is actually quite tricky since it is really the same button.

    Why do you need to hide the add new one on grid and not the other?

  • Community Member Profile Picture
    on at

    Hi Scott,

     

    I have a genuine reason. On the + click I am calling a HTML web resource page where the users can define data in different permutations (either by selection and/or by newly defined). Finally when they submit, I am generating the entity record[s]. I am not calling the entity form.

    E.g users can enter a range from 100-105. I will be creating 5 entity records. The sub grid will be showing all the 5 records and each will be integrated to DB2 table separately.

     

    Also in general, users does not show interest in having many clicks.

     

    Now tell me how to achieve this.

     

    Alternatively, if the above is not possible, Please suggest how to call the same HTML page on click of the both buttons (maybe we can convince business users saying from both the places you can create records)

     

    Another question – Is it possible to attach my own command to the OOB button using ribbon workbench?

     

    Actually by referring to the below blog (Thanks to Aileen) I did overwrite the OOB function and could able to call my HTML page on + button click, but could not achieve the same on Grid button click.

    http://missdynamicscrm.blogspot.com/2015/08/tweak-modify-ribbon-in-crm-2013-subgrid.html

     

    Thanks in advance and I would appreciate your time and looking forward to hearing from you.

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    I really would recommend against using this approach as it is very prone to break at somepoint due to the unsupported nature.

    It's better to open the Ribbon Workbench, load the entity then click ->Customise Command on the 'Add New {0}' button on the 'Sub Grid' you can then attach your own Custom Action that calls some custom Javascript. This will be in effect both on the subgrid and the associated records grid.

    Hope this helps!

  • Community Member Profile Picture
    on at

    Hi Scott,

    Thanks for your suggestion. This answers one of my question- that means it is possible to attach custom JavaScript to OOB button "Add New{0}", however this is not working. I did the same before starting this thread. I added another button, attached the same custom action (JavaScript function) to open my HTML web resource page. The later works but not with the OOB button, I tried the same in CRM 2011 it does not work with OOB button.

    Am I doing anything wrong?

    Thanks

  • ScottDurow Profile Picture
    21 on at

    Hi - Could you post your ribbonxml and I'll take a look.

  • Community Member Profile Picture
    on at

    Hii Scott,

    Sorry for late response.

    After digging further I could able to attach custom command to OOB button ("Add New{0}"). It's now opening my html page.

    This change leads to another issue :  Hope you have some suggestion.

    Issue: After adding custom command to OOB button the + button disappears. how do we get it back?

    Below are the overall steps which I did for customization.

    1. Hide one of the two "Add Existing {0}" buttons of sub entity in sub grid--> this is to dis allow add existing behavior of the + button. Till here it is good

    2. Customize Button "Add New {0}"

    3. Added custom command JavaScript to open html web resource page.

    End Result:

    1. It hides the + button on sub grid --> Which I don't want

    2. It opens my html page on clicking "Add New..." on Associating grid view --> this is good and I needed.

    Attached the ribbonxml. Please review and suggest the possibilities.

    ./cfs-file/__key/communityserver-discussions-components-files/117/RibbonDiffXml.zip

    Thanks in advance and appreciate your time

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi,

    Rather than customise the button and change the commmand, can you 'Customise Command' and then change the actions in the command.

    The button on the subgrid cannot be customised (only the command can) which is why you are seeing it hidden.

  • bhavika patel Profile Picture
    40 on at

    Hello Scott

    This is exactly what I am facing. For me "Customize Command" is disabled when I try to right click on the "Add New" sub-grid button.

    Any idea what could be the reason ?

    TIA!!

    Regards,

    Bhavika

  • Kenneth Leong Profile Picture
    360 on at

    [quote user="SreeRaj"]

    Hi

    how do we customize so that it should show + button on the sub grid of an entity form and hide "Add new" button on associated grid view.

    When I tried to hide the "Add new" button of Sub grid using ribbon workbench, it hides both the + button of sub grid and "Add New" button of Associated grid view.

    Requirement :

    I need  to show AddNew.PNGon sub grid and when navigates to Associated grid view the command ribbon should not show AddNew.PNG button.

    Please suggest the possibilities.

    Thanks in advance

    [/quote]

    I'm running into the same problem with the activity pointer "+" add button. By using the ribbon editor, i was able to remove add/add existing in the associative view, but was not able to remove the "+" button in the subgrid. ScottDurow any idea?

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