Applies to Product – Microsoft Dataverse
What’s happening?
The window.close() function does not work in an HTML web resource that is opened via Xrm.Navigation.navigateTo().
Reason:
The window.close() function is treated as a modal dialog within the Dynamics 365 Unified Interface, which prevents it from functioning as expected.
Resolution:
- As a mitigation method, it's recommended to prepend the custom HTML dialog directly in a new tab, which allows the page to close after clicking the close button.
