web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 

I have the same question (0)
  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Alternatives to ClientGlobalContext.js.aspx & addOnKeyPress in Unified interface

    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
    RE: Alternatives to ClientGlobalContext.js.aspx & addOnKeyPress in Unified interface

    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
    RE: Alternatives to ClientGlobalContext.js.aspx & addOnKeyPress in Unified interface

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

  • Zach G Profile Picture
    15 on at
    RE: Alternatives to ClientGlobalContext.js.aspx & addOnKeyPress in Unified interface

    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
    RE: Alternatives to ClientGlobalContext.js.aspx & addOnKeyPress in Unified interface

    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

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 > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
#ManoVerse Profile Picture

#ManoVerse 101

#2
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans