Adding a button on ribbon and on click, opens quick create form using ribbon workbench in XRM ToolBox

In this blog, we’ll see how to create a button on ribbon by using ribbon workbench in XRM toolbox and on click, open quick create form.

Step 1- Insert a ribbon button on any required record form using ribbon workbench on XRM toolbox.

Step 2- Name the ribbon button (anything as required)

Step 3- Add button properties-

  1. Give ID name
  2. Label name
  3. Icon for the button

Step 4- Add the following code to open a quick create form on click of the button

var RecordaMeeting = {

    //RecordaMeeting.OpenRecord

    OpenRecord: function (primaryControl) {

        var entityFormOptions = {};

        entityFormOptions[“entityName”] = “Add the entity name”;

        entityFormOptions[“useQuickCreateForm”] = true;

        var formParameters = {};

        // Open the form.

        Xrm.Navigation.openForm(entityFormOptions, formParameters).then(

            function (success) {

                console.log(success);

            },

            function (error) {

                console.log(error);

            });

    },

Step 5- After adding the script, add the command for the button-

  1. Web resources library name
  2. Web resources function name
  3. CRM Parameter: PrimaryControl

Step 6- Add command on button properties.

Step 7- Publish the button.

Screenshots of implementation:

Step 8- Button appears on the ribbon for the required entity.

Step 9- On click of button, quick create form opens.

Hope this helps!!


Share Story :

SEARCH BLOGS :

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange