Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Xrm.Page deprecation and lost form context

$
0
0

Hello,

According to this Article "Important changes (deprecations) coming in Power Apps and Power Automate - Power Platform | Microsoft Learn" Xrm.Page is deprecated and will be removed from future release.

We've gone through our JavaScript code base and removed where it is used but I have a recurring situation where I'm not sure why I am losing form context.

We have this code which is called in almost every script page we have

export function getFormContext(parent?: Window): Xrm.FormContext {
let context: Xrm.FormContext;

if (formContext) {
context = formContext;
} else {
LogHelper.logUiException(new Error().stack, "No form context!!!");
}
return context;
}

It works fine but sometimes it will throw the error for 'No form context' which in of itself doesn't cause a problem but I dont know why it would not have a form context?

Has anyone else came across this and do you have any solutions?

Thanks!


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>