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

Remove default alert while navigating to different page in model driven app

(0) ShareShare
ReportReport
Posted on by 5

I am trying to use the Report main form to create a new Report however, I am using a custom ribbon button on Report Main Form called "Generate Report". Then I am using the javascript webresource to generate the report which uses fetch XML to get the data from dataverse table and convert it to csv format and uploads the file to the newly generated report, once the report is created I want to navigate the user to the Report edit form that has been generated by passing the newly generated Report GUID id. Everything is working fine but whenever I want to navigate to the newly generated report from the create Report form the alert pops up saying to save changes before leaving the page as shown in the image below. I want to remove that alert message just for the report form when the generate report button is clicked which navigates back to the newly generated report.

pastedimage1684203131291v1.pngpastedimage1684203215707v2.png

I have the same question (0)
  • Suggested answer
    Ray Profile Picture
    1,537 on at

    This pop-up only shows when there is unsaved field change on form.

    You can try this code to find out the unsaved fields:

    Xrm.Page.data.entity.getDataXml():

    pastedimage1684223705383v1.png

    After this, if you still want to ignore the field change and the pop-up, you can set the SubmitMode property to "never":

    formContext.getAttribute("new_accounthierarchy").setSubmitMode("never")

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 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans