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 365 | Integration, Dataverse...
Suggested Answer

How to launch Entity form as popup form javascript ?

(0) ShareShare
ReportReport
Posted on by 483

Hello,

i want to launch Entity form as popup form on button click?

I will create custom button using PCF Control and place it on form and on click of it need to launch entity form as popup form.

Please suggest using javascript.

Thanks,

Krishna Prasad.

I have the same question (0)
  • Suggested answer
    Gilmeyer Profile Picture
    on at

    Hi,

    You can use  following command - Xrm.Navigation.openForm associated to the button onclick event.

    Refer to :

    Thanks

  • dkrishna Profile Picture
    483 on at

    Thanks for the response !

    I want launch main form as popup form is this possible with javascript?

  • Suggested answer
    Gilmeyer Profile Picture
    on at

    Yes , you can ! Please use JS method Xrm.Navigation.openForm(entityFormOptions,formParameters) with entityFormOptions["openInNewWindow"] = true;

    For more information and example, refer to our client side API - docs.microsoft.com/.../openform

    Thanks

  • Suggested answer
    Jackir Profile Picture
    75 on at

    Hi Krishna

    are you using UCI or the Classic one ?

    Thanks,

    Jackir

  • Suggested answer
    LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    It is possible.

    You could use JS code to do this. For example, I want to open a contact form in popup window when I change the name field in my test entity form, I used the following code.

    function openFormPop(){
        var entityFormOptions = {};
        entityFormOptions["entityName"] = "contact";
        entityFormOptions["entityId"] = "8DA6E5B9-88DF-E311-B8E5-6C3BE5A8B200";
        entityFormOptions["openInNewWindow"] = true;
        entityFormOptions["height"] = 100;
    
    // Open the form.
    Xrm.Navigation.openForm(entityFormOptions).then(
        function (success) {
            console.log(success);
        },
        function (error) {
            console.log(error);
        });
    }

    pastedimage1581339957313v1.png

    Since you are using PCF control, just add the JS method in onchange event and have a try.

    And in additional, you could even pass values as parameter to the popup form to set the values to fields.

    For more details, you could refer to this doc.

    pastedimage1581340007397v2.png

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/xrm-navigation/openform

    Hope it helps.

    Best Regards,

    Leo

  • dkrishna Profile Picture
    483 on at

    Thanks for the response ..

    Is it possible to lauch main form as popup using popup service in PCF?

  • dkrishna Profile Picture
    483 on at

    UCI view.

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    I launched the main form of contact in my last answer in PCF control so I think it is possible.

    May I ask that what does pup up service mean? I'm not sure about this.

    Regards,

    Leo

  • dkrishna Profile Picture
    483 on at

    If we lauch as you mentioned it will show left navigation links also but i want main form to show like as quick create form where it doesnt show any unnecessary things in form.

    Can we use below mentioned code  and launch main form github.com/.../index.ts

  • LeoAlt Profile Picture
    16,331 Moderator on at

    Hi partner,

    Unfortunately, we could not do like that in D365 with main form.

    We could only open the main form with all components. If you don't need so much unnecessary things in main form, you could create a custom form and open in in a popup window.

    Hope it helps.

    Best Regards,

    Leo

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 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans