Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Xrm.Utility.openEntityForm: open form in new window (popup)

Posted on by Microsoft Employee

I am using this function to open a new entity form, but it opens in the same window. Is it possible to open it in a popup window?

The solution here does not work, because there is just a link to the function description: https://community.dynamics.com/crm/f/117/t/119978

In this page the last example (with extraqs) does open a popup window but if I click "Save and close" on the new window, what I see then is a view with all opportunities, but I would like to see the calling page where I was before.

Thank you

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Xrm.Utility.openEntityForm: open form in new window (popup)

    var entityFormOptions = {};

    entityFormOptions["entityName"] = "contact";

    entityFormOptions["openInNewWindow"] = true;

    docs.microsoft.com/.../openform

  • Suggested answer
    Luke Sartain Profile Picture
    Luke Sartain 1,266 on at
    RE: Xrm.Utility.openEntityForm: open form in new window (popup)

    To expand on Andrii's link you'll need something like this:

    var options = { openInNewWindow: true };
    Xrm.Utility.openEntityForm(entityname, recordid, null, options);

  • Suggested answer
    Yadnyesh Kuvalekar Profile Picture
    Yadnyesh Kuvalekar 4,102 on at
    RE: Xrm.Utility.openEntityForm: open form in new window (popup)

    Hi,

    To achieve your requirements, you should not open the new entity form in separate window. Rather if you open the new entity form in same window, then on Save & Close, it will navigate the user to the parent page from where it was called. So no need of new window.

    Kindly tick verify answer if this resolves your query.

    Thanks.

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Xrm.Utility.openEntityForm: open form in new window (popup)

    Hello,

    Check this - msdn.microsoft.com/.../jj602956.aspx especially part related to windowOptions.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans