web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Alternatives to ClientGlobalContext.js.aspx & addOnKeyPress in Unified interface

(0) ShareShare
ReportReport
Posted on by 1,331

Hi Folks,

We have few Custom HTML Webresources which were standalone and not called from any form or a ribbon. ClientGlobalContext.js.aspx is used to get context information previously. 

But understood that this would be deprecated on Dec 1, 2020. Is there any alternative for this in UCI? Also please let us know if there was any other way to replace addonkeypress event without using any custom control.

Thank you.

Pavan Mani Deep 

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Pavan,

    What information do you use from the context? Pretty much everything can be received either from the Url or queries using WebApi.

    Unfortunately there is no direct replacement for addOnKeyPress. You will have to use Custom PCF control. I created it already so you can tru it - github.com/.../Text-Autocomplete-Control

  • Verified answer
    Henry J. Profile Picture
    5,237 on at

    Hi Pavan,

    On top of Andrew's advise, please refer to this page on ClientGlobalContext.js.aspx deprecation:
    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/getglobalcontext-clientglobalcontext.js.aspx

    Henry

  • pavanmanideep Profile Picture
    1,331 on at

    Thank you Andrew & Henry...for your suggestions...

  • Zach G Profile Picture
    15 on at

    Andrii,

    How would you have access to the WebAPI without ClientGlobalContext.js.aspx?  Just to get the URL to CRM, you need to call Xrm.Utility.getGlobalContext().

    How do we get around this?

    Thanks,

    -Z

  • Suggested answer
    Henry J. Profile Picture
    5,237 on at

    An important update on ClientGlobalContext.js.aspx's deprecation and removal timeline:

    The ClientGlobalContext.js.aspx page is deprecated and scheduled to be unavailable after October 1, 2021.
    Alternative methods to access global context information will be available before April 1, 2021

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/getglobalcontext-clientglobalcontext.js.aspx

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 77 Super User 2026 Season 2

#2
ParthPatel249 Profile Picture

ParthPatel249 56

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 44 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans