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>
Thanks Updated article good shout. Are you able to reproduce?
This referred blog didn't explain that this has broke in D365 Classic Web interface.
Can you please paste excerpt of code from your html webresource and also properties dialog of webresource to verify on the same.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156