Skip to main content

Notifications

Announcements

No record found.

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

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
    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
    Arjan98 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
    Arjan98 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
    Abdul Wahab 12,070 Super User 2024 Season 1 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

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans