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 :
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
    587 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

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

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 72 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 29 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans