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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Xrm.Navigation.openForm, opening a specific form in the new UI

(0) ShareShare
ReportReport
Posted on by 2,485

Hi all,

I have a ribbon button on an entity that when clicked launches a form on a different entity and opens a specific form.  This works fine in the Classic Interface but doesn't seem to honor opening a specific form in the new UI.

In ribbon workbench I have the following:

733567.Capture.PNG

and the JavaScript that is called is as follows:

function OpenSpecificForm(primaryControl)
    {
        const FORMID = "A696976B-EA8A-42F3-B4DC-F35DC9204D58";                      

        var formContext       = primaryControl;
        var parameters        = { formid: FORMID };
        var entityFormOptions = {};
        entityFormOptions["entityName"] = "new_entity_name";

        var recordId = formContext.data.entity.getId();                    
        var recordName   = formContext.getAttribute("new_name").getValue();    

        if (recordId != null)   { parameters["new_targetentityfieldid"] = recordId; }
        if (recordName != null) { parameters["new_targetentityfieldname"] = recordName; }

        Xrm.Navigation.openForm(entityFormOptions, parameters);
    }

Have I missed anything obvious?

Thanks in avdance

*This post is locked for comments

I have the same question (0)
  • BharatPremji Profile Picture
    2,485 on at

    To add to this, the entity form DOES open in the new UI but not to the form I expect.

  • Kevin Grech Profile Picture
    380 on at

    Maybe the parameters are case sensitive. In the documentation it's formId (capital i)

    Link just in case

    docs.microsoft.com/.../openform

  • Verified answer
    BharatPremji Profile Picture
    2,485 on at

    Hi Kevin,

    Thanks for the reply.

    I did think of that when first setting this up and came across this article which suggests that there is a mistake in the Microsoft documentation:

    stackoverflow.com/.../53406004

    The formid needs to go into the formParameters and not in entityFormOptions.

    Bharat

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans