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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Xrm.Navigation.openForm() does not open quickCreateForm

(0) ShareShare
ReportReport
Posted on by 55

Hello guys, I have one issue with the Client API reference.

You should be able to open form through client javascript.

But it's not working, has someone came accross the same issue?

I'm calling method openForm from button in the ribbon.

Every variable has the right value, but instead of quickCreateForm, I'll get the main form.
This is my javascript:

function openNewPrefilledKeepingEntityQuickCreate(entityLogicalName, entityId, nameField, friendlyNameField){
    var entityFormOptions = {};
    entityFormOptions["entityName"] = "talxis_o365groupssynckeepingentity";
    entityFormOptions["useQuickCreateForm"] = true;

    if (friendlyNameField === undefined) {
        Xrm.WebApi.retrieveRecord(entityLogicalName, entityId, `?$select=${nameField}`).then(
            function success(result) {
                var formParameters = {};
                formParameters["talxis_name"] = result[nameField];
                formParameters["talxis_targetedrecordurl"] = `?etn=${entityLogicalName}&id=${entityId}`;

                debugger;
                Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
                  function success(result) {
                      console.log(result.message);
                  },
                  function (error) {
                      console.log(error.message);
                  });
            },
            function (error) {
                console.log(error.message);
            }
        );
    }
    else {
        Xrm.WebApi.retrieveRecord(entityLogicalName, entityId, `?$select=${nameField},${friendlyNameField}`).then(
            function success(result) {
                var formParameters = {};
                formParameters["talxis_name"] = result[nameField];
                formParameters["talxis_friendlyname"] = result[friendlyNameField];
                formParameters["talxis_targetedrecordurl"] = `?etn=${entityLogicalName}&id=${entityId}`;
                
                Xrm.Navigation.openForm(entityFormOptions, formParameters).then(
                  function success(result) {
                      console.log(result.message);
                  },
                  function (error) {
                      console.log(error.message);
                  });
            },
            function (error) {
                console.log(error.message);
            }
        );
    }
}


Here is the execution picture:

5710.Capture.PNG

But I'll get the main form. The "Allow quick create" option is checked and the form exists:

5710.Capture.PNG

5710.Capture.PNG

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    I would first check if you are able to use the Global + button at the top to create record using Quick Create form for the entity.

    Are you doing this from a Model Driven App? If so, have you included your Quick Create form in the app?

  • Jan Kostejn Profile Picture
    55 on at

    I'll try it one more time with the pictures...

    Here is the execution picture:

    4657.Capture2.PNG

    But I'll get the main form. The "Allow quick create" option is checked and the form exists:

    4657.Capture2.PNG

    458764.Capture.PNG

    I was testing it in Chrome Version 73.0.3683.103 (Official Build) (64-bit)

  • Jan Kostejn Profile Picture
    55 on at

    Hi Kokulan,

    I was testing it against the trial instance and including the form in model driven app solved my issue!, thanks a lot.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans