Share via

Issue while opening / loading Contact form using window.open

Integrations PM 0 Reputation points
2026-03-04T18:00:27.8233333+00:00

We are encountering an issue where the Contact form is not loading correctly due to the use of the deprecated window.open method. We understand that the recommended approach is to use Xrm.Navigation instead. However, this change is challenging for us because our 8x8 integration runs in a separate browser window, and the Contact form is intentionally opened in a new window to support this interaction model. This creates a constraint between Microsoft’s recommendation and our current architecture. Could you please advise on a supported approach that would allow us to maintain a separate-window model while aligning with current best practices?

Microsoft Partner Center API
0 comments No comments

2 answers

Sort by: Most helpful
  1. Integrations PM 0 Reputation points
    2026-03-04T18:03:33.6333333+00:00

    we are Using URL‑based main.aspx navigation with window.open only from the external 8x8 window, which is a documented and supported pattern. Contact form opened from external 8x8 window is also causing the issue

    0 comments No comments

  2. Q&A Assist
    2026-03-04T18:00:45.2033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    For a supported and performant approach, use the platform navigation APIs inside the model‑driven app and reserve window.open only for scenarios outside the app.

    1. Use Xrm.Navigation.openForm or Xrm.Navigation.navigateTo inside Dynamics 365 / model‑driven apps
      • When opening Contact (or any table) forms programmatically from web resources or scripts running in the app, use:
        • Xrm.Navigation.openForm to open a form in the current window.
        • Xrm.Navigation.navigateTo to open forms or views in a side panel or dialog.
      • Guidance explicitly states not to use window.open from within the app for forms:
        • “Use Xrm.Navigation.openForm when you open forms programmatically within the application by using web resources. Do not use window.open.”
        • This allows the platform to leverage in‑memory caching and modern performance optimizations.
    2. Keep the separate 8x8 window outside the app and open CRM via URL from there
      • Outside the model‑driven app (for example, from the 8x8 integration window that is not hosted in Dynamics), it is supported to open forms via URL using window.open or a standard link:
        • “Outside the application, where pages do not have access to the Xrm.Navigation.openForm or Xrm.Navigation.navigateTo functions, use window.open or a link to open a specific record or form for a table.”
      • Use URL‑addressable forms via main.aspx to open the Contact form in a separate browser window, for example:
             https://<org>.crm.dynamics.com/main.aspx?etn=contact&pagetype=entityrecord&id=<CONTACT_GUID>
        
      • This keeps the 8x8 integration in its own browser window while still using a supported pattern for opening Dynamics forms.
    3. Avoid opening additional CRM windows from within CRM
      • The performance guidance for model‑driven apps recommends not opening new windows from within the app:
        • “Don’t open new windows… As an alternative to opening new windows, consider using the multisession experience that allows records to be opened in multiple tabs while still maximizing the performance benefits of client caching.”
      • If multiple records are needed within the CRM UI itself, use the multisession/tabbed experience instead of window.open.
    4. If dialogs are involved
      • For dialog processes opened by URL, other browsers may block window.close if the window was not opened via JavaScript. In those cases, when opening dialogs from outside the app, use window.open from the external window so that closing behavior works as expected.

    In summary, keep the separate‑window model by:

    • Using Xrm.Navigation.openForm / navigateTo for any navigation initiated inside Dynamics.
    • Using URL‑based main.aspx navigation with window.open only from the external 8x8 window, which is a documented and supported pattern.

    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.