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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Add new button to subgrid

(0) ShareShare
ReportReport
Posted on by 410

Hi all,

In an Account entity, if we need to create new sales order we need to go to a section called Finances, and from there to select +new from the order subgrid to create a new order for the related account.

I wanted to speed up a little the process by putting a custom button New Order in the subgrid of the Account form which will trigger the same process as it would from the order subgrid.

Can anyone propose a solution/step guide on how to achieve this?

This is actually a good way afterward to reuse the same steps for other records if requested by the other team (for RMA, work orders, etc.)

I already have installed Ribbon workbench, but I haven't actually created any button so far, so it's quite confusing with all these commands and rules attached to the button, so I don't know which should I choose and link together to make the button work on select.

Best regards

Kiril

I have the same question (0)
  • Inogic Profile Picture
    651 on at
    RE: Add new button to subgrid

    Hi,

    There are multiple blogs and articles available on the web to “add button in Dynamics CRM using Ribbon workbench” you can use them to add a new button in the entity. In your case, you need to select Account entity and add (i.e. drag) the button in the middle row of the Ribbon workbench which is for subgrid, so that your button will start showing in the subgrid.

    Most of the blogs and articles explain how to add an action for triggering of JavaScript the web resource on click of that newly added button. You need to follow that and a add simple JavaScript web resource’s function on click of your button. Then in JavaScript, the web resource that triggers on click on that newly added button, you will need to write code to create a new order.

    Basically, you will select a record from the account subgrid and click on the button. The button will run the JavaScript code and will open a new order record by setting the reference of the selected account record.

    Hope that gives clarity to your query!

    Thanks for asking.

  • Radoslavov Profile Picture
    410 on at
    RE: Add new button to subgrid

    Hi, unfortunately, this is not much of a help for me since I'm not a developer so I was hoping for a more clear approach with reference where a similar thing was done so I can reuse the same steps/solution .

    regards

  • Radoslavov Profile Picture
    410 on at
    RE: Add new button to subgrid

    I actually found my solution so i'm pasting it for others that might look for something like this.

  • Suggested answer
    Radoslavov Profile Picture
    410 on at
    RE: Add new button to subgrid

    I actually found my solution so I'm pasting it for others that might look for something like this.

    I created a new Command and provided the below parameters –

    pastedimage1610381459392v1.png

    Make sure you enter the name of your entity in String Parameter shown above correctly, in my case, it is salesorder.

    Attach this Command to the Button

    pastedimage1610381459394v2.png

    Now Publish and check.

    Now, when I go to Account, I see my button called Create Order

    pastedimage1610381459394v3.png

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 109

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 77 Super User 2025 Season 2

#3
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans