Skip to main content

Notifications

Service | Customer Service, Contact Center, Fie...
Unanswered

GetGlobalContext().getQueryStringParameters() and deprecation

Posted on by 65

0677.changes.PNG

See code in footer.

So... I would really like to understand something here from Microsoft.

They have a deprecation page here: https://docs.microsoft.com/en-us/power-platform/important-changes-coming

Great.

Now can someone explain to me why they have fundamentally changed GetGlobalContext().getQueryStringParameters()? It not longer returns typename, type, orgname, userLcid, orgLcid, data, formid, entrypoint? All of which are important especially when working with web resources. To be clear I am talking about the Online version where Unified Interface has been disabled/turned-off. I am using the classic web interface on Dynamics 365 and expected the *to-be* but *not-yet* deprecated Client XRM API to be maintained? The deprecation page says that we can continue to use the old API until an announcement is made for when it will be removed from the platform. In the meantime, is too much of me to ask that they don't change the "as-is" object model??

Just incase anyone comes across this post looking for a solution Andrew Butenko did a great post on the new way

https://butenko.pro/2018/12/07/html-webresource-classic-ui-vs-uci-story-of-broken-functionality/

This is worrying behaviour to me because there is no point documenting their API and stating that nothing will change without giving us notice to then go and remove something as fundamental as being able to get query variables along with entity record data using a tried and tested approach?

If I have got this wrong please someone educate me as I see this as a huge risk to online deployments if MS don't even honour there own deprecation announcements?

Thanks

Antony

Demo.js
    document.onreadystatechange = function () {

        if (document.readyState == "complete") {

            console.log(new Date() + "  library is now loaded and ready");
            debugger;
           
            // As of Oct 2019 this is broken functionality despite Microsoft saying
            // The old Client API is not yet deprecated and therefore supported!?
            // get all params this will be the dynamic ones passed into webresource when option 'Pass record object-type code and unique identifier as parameters’ is ticked
            var params = GetGlobalContext().getQueryStringParameters();

            // stuff hardcoded in the form web resource through designer e.g. a custom JSON object etc.
            var customparams = params.data;

        }
    }

HTML Resource

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html lang="en-us">

<head>

<title>Demo</title>

<script src="../../ClientGlobalContext.js.aspx" type="text/javascript"></script>

<script src="../scripts/Demo.js" type="text/javascript"></script>

  • Antony Ellis Profile Picture
    Antony Ellis 65 on at
    RE: GetGlobalContext().getQueryStringParameters() and deprecation

    Thanks Updated article good shout. Are you able to reproduce?

  • thonda Profile Picture
    thonda on at
    RE: GetGlobalContext().getQueryStringParameters() and deprecation

    This referred  blog  didn't explain that this has broke in D365 Classic Web interface.

    pastedimage1570672939115v1.png

    Can you please paste excerpt of code from your html webresource and also properties dialog of webresource to verify on the same.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,297 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans