Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

Add new button to subgrid

Posted on by 380

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

Categories:
  • Suggested answer
    Radoslavov Profile Picture
    Radoslavov 380 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

  • Radoslavov Profile Picture
    Radoslavov 380 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.

  • Radoslavov Profile Picture
    Radoslavov 380 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

  • Inogic Profile Picture
    Inogic 24,031 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.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans