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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to disable "Leave this page" pop-up when clicking on a record trough entity list in pop-up navigation

(0) ShareShare
ReportReport
Posted on by 5

Hello,

Is it possible to disable the pop-up "leave this page" when you click on a record while your viewing the entity list in a pop-up?

I use this code to open a entity list in a pop-up navigation:

	var pageInput = {
		pageType: "entitylist",
		entityName: "account"
	};
	var navigationOptions = {
		target: 2,
		height: {value: 90, unit:"%"},
		width: {value: 90, unit:"%"},
		formType: 2,
		position: 1


	};
	Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
		function success() {
				// Run code on success
		},
		function error() {
				// Handle errors
		}
	);

But when i click on a record to view more details it will give a pop-up with "Leave this page"

pastedimage1663761661782v1.png

How can i disable this pop-up and let the user click trough so he can see the record details? Is this possible or are there other ways to achieve this?

Kind regards,

Arjan

I have the same question (0)
  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Arjan98,

    As per the link and screenshot, you can not define target = 2 for the entity list

    navigateTo (Client API reference) in model-driven apps - Power Apps | Microsoft Learn

    pastedimage1663762473154v1.png

    Open list  as mentioned

    var pageInput = {
        pageType: "entitylist",
        entityName: "account"
    };
    Xrm.Navigation.navigateTo(pageInput).then(
        function success() {
                // Run code on success
        },
        function error() {
                // Handle errors
        }
    );

    For more details link: navigateTo (Client API reference) in model-driven apps - Power Apps | Microsoft Learn

    After following best practices the issue might be resolved.

    If I answer your question then please mark it as verified.

    Let me know if I can provide you with more details.

    Thanks
    Regards,

    Abdul Wahab
    Power Platform/Customer Engagement Developer/Lead/Solution Architecture/Project Manager
    Direct/WhatsApp: 923323281237
    E-mail: abdulwahabubit@outlook.com
    Skype: abdul.wahabubit
    Linkedin: www.linkedin.com/.../

  • Arjan98 Profile Picture
    5 on at

    Hi,

    Thanks for your answer.

    I don't want to open it inline, i want to to open it as a dialog, as you can see in the screenshot it will work for the entity list.

    I just want to disable the "Leave this page" pop-up and let the user click trough in the dialog.

    Regards,

    Arjan

    Edit 22-09-2022:

    When you use "Advanced search" a dialog will open a new dialog when the user clicks trough:
    pastedimage1663837115966v1.png

    a new dialog will open without the message "Leave this page"

    pastedimage1663837163687v2.png

    Is this also possible for navigateTo (Client API reference) in model-driven apps - Power Apps | Microsoft Learn?

  • Suggested answer
    Arjan98 Profile Picture
    5 on at

    I already have a work-around. I used a web resource with an iframe to show the entity list.

  • Suggested answer
    Tamilarasu Arunachalam Profile Picture
    593 on at

    For removing that popup, you have to use like this below piece of code.

    //get the url of the page you want to direct 
    var url=parent.window.location.protocol "//" parent.window.location.host "/" parent.window.location.pathname;
    
    //open the url in same tab
    parent.window.open(url,"_self");
    
    //open inside a popup
    var windowOptions={height:400,width:400};
    Xrm.Navigation.openWebResource(url,windowOptions)

    Hope this will be helpful to you

    Have a great day,

    Tamilarasu Arunachalam

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 > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 184 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 125

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans