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

  • Suggested answer
    Tamilarasu Arunachalam Profile Picture
    558 on at
    RE: How to disable "Leave this page" pop-up when clicking on a record trough entity list in pop-up navigation

    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

  • Suggested answer
    Arjan98 Profile Picture
    5 on at
    RE: How to disable "Leave this page" pop-up when clicking on a record trough entity list in pop-up navigation

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

  • Arjan98 Profile Picture
    5 on at
    RE: How to disable "Leave this page" pop-up when clicking on a record trough entity list in pop-up navigation

    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
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: How to disable "Leave this page" pop-up when clicking on a record trough entity list in pop-up navigation

    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/.../

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 78 Super User 2025 Season 1

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 47

Overall leaderboard

Product updates

Dynamics 365 release plans