AL icon indicating copy to clipboard operation
AL copied to clipboard

Got "Leave site? Changes you made may not be saved." message when I tried to close Sales Order page

Open monchangg opened this issue 7 years ago • 1 comments

I added a action button in Sales Order page, after clicking this action button, it will popup a modal page. On this modal page, I added iframe and src is a third-party page through business central's controladdin object. This third-party page has a form, it has a textbox and submit button in the form. But after I submitted form data and closed modal page, if I click Back Arrow on Sales Order page, the following screenshot's message popuped. image If I continue to click 'Leave' button, business central seems to reset itself. It seems some issues happened. I don't want to show this message box and reset business central. Could anyone can help me to look into this issue? Is business central's itself issue?

My Business Central version is 14.0.29530.31705 and AL version is 3.0.145997

Following is my detailed code: Control Add-In object code: controladdin MyCrlAddInDemo { Scripts = 'https://code.jquery.com/jquery-2.1.0.min.js', 'Scripts/main.js'; StartupScript = 'Scripts/start.js';

RequestedWidth = 800;
RequestedHeight = 450;
MinimumWidth = 800;
MinimumHeight = 450;
MaximumWidth = 800;
MaximumHeight = 450;
HorizontalShrink = true;
VerticalShrink = true;
HorizontalStretch = true;
VerticalStretch = true;

event ControlReady()
procedure OpenPage()

}

start.js code: Microsoft.Dynamics.NAV.InvokeExtensibilityMethod("ControlReady", []);

main.js code: function OpenPage() { $('#controlAddIn').html("