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 :
Customer experience | Sales, Customer Insights,...
Unanswered

Ribbon Workbench button to create new record

(0) ShareShare
ReportReport
Posted on by 410

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

I have the same question (0)
  • Thomas David Dayman Profile Picture
    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

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

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 107 Super User 2025 Season 2

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 89

#3
#ManoVerse Profile Picture

#ManoVerse 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans