Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Unanswered

Ribbon Workbench button to create new record

Posted on by 380

Hi All,

I have a custom button on the account entity which creates a new order when clicked.

The button works great, but I'm trying to make it work as the standard create order button and to load some of the account information such as Account Name in Potential Customer, and etc.

pastedimage1609934147285v1.jpeg

So far it just opens the new order form but the rest has to be added manually.

Does anyone know what filter or parameter I have to add in Ribbon Workbench for the button Command?

pastedimage1609836818695v1.png

Regards

Kiril

  • Radoslavov Profile Picture
    Radoslavov 380 on at
    RE: Ribbon Workbench button to create new record

    Great, thank you for the reference, indeed this was what I was looking for. However, it gives me an error message when loading the order form, I'm sure it is something is the JS.

    Have you tested/used this option before to confirm if indeed is working? 

    this is the button parameter that I've added

    pastedimage1609929407753v1.png

    This is the code I've included in the JS and attached it to the Order form on load along with enabled Pass execution context as first parameter

    function XrmCore.Commands.Open.openNewRecord(primaryControl) {

    var formContext = primaryControl;

    }

    and the error message that i get is:

    Error when loading the Order form: Web resource method does not exist: XrmCore.Commands.Open.openNewRecord

  • Thomas David Dayman Profile Picture
    Thomas David Dayman 11,323 on at
    RE: Ribbon Workbench button to create new record

    You need to use the CRM Parameter and the PrimaryControl value to get the values from the Account and pass it to the new order record

    blog.magnetismsolutions.com/.../getting-dynamics-365-formcontext-from-ribbon-workbench

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,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans