Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Xrm.Page deprecation vs removal

(0) ShareShare
ReportReport
Posted on by 55

Good afternoon, we have cutover from legacy web to UCI planned for sometime in late november 2020 for our prod environment. We have lots of previously created javascript (present and past developers) that has references to xrm.page. But a lot of it is in nested code blocks that are not being used anymore/obsolete.

So in our sandbox environment we have enabled UCI and running thru manual user tests to discover any behavioral issues with UCI. We are not changing any code unless some user testing reveals a script error in UCI. When that happens we analyze the error and usually it turns out to be xrm.page object graph related (ex. xrm.page.getAttribute()...). Then we analyze the relevant function call graph to ensure the getFormContext() based replacement gets passed in there. Then retest the script error thrown by runtime behavior. So far so good. 

However we are not changing xrm.page references everywhere as it's in a lot of places in the script and in a lot of other scripts, and most of the references to xrm.page appear to be working as of Oct 2020 in the sandbox UCI.

However I do want to know when the actual removal of xrm.page object model from dynamics will take place. I understand as of oct 2020 it is deprecated but still operational. Is it reasonable assumption that we are still atleast 6 months away. If xrm.page based behavior is working and testing fine in UCI sandbox right now, will it continue to work in UCI prod on Dec 1, 2020 after we have cut over to UCI? And before the date in future when it actually won't work at all, how will we be notified that all xrm.page references needs to be converted over or javascript will break completely.

Basically I am trying to understand how much time we have to do a complete rewrite of these javascript libraries. Because what we are doing right now is surgical changes where we find issues during UCI testing.

Thanks

https://docs.microsoft.com/en-us/power-platform/important-changes-coming#some-client-apis-are-deprecated

"Use of the Xrm.Page object as a static access to the primary form context is still supported to maintain backward compatibility with the existing scripts. Based on the feedback, we understand that the usage of Xrm.Page is high, and it won't be removed as soon as some other client API methods listed in this section."

  • Suggested answer
    Amit Prajapati Profile Picture
    156 on at
    RE: Xrm.Page deprecation vs removal

    Hi,

    I would suggest starting working on the Web Resource upgrade to support the deprecated method on Environment because Microsoft can remove the support Xrm.Page after 6 months,  1 year, or 1 year, or 6 months it is highly unpredictable.

    The following step you can take to upgrade all the custom scripts:

    1. Gather information able the script which have deprecated method and what is the replacement of those methods using Javascript Validator [XRMTools]

    2. Update all the script with updated methods

    3. Test the business process of your Environment

    4. Let your user test the environment

    If non of the scripts is breaking you can Go-Live to the production environment.

  • Suggested answer
    Roberto Ilidio Profile Picture
    on at
    RE: Xrm.Page deprecation vs removal

    Hi, 

    Indeed the official is still what is stated in documentation already mentioned by you - https://docs.microsoft.com/en-us/power-platform/important-changes-coming#some-client-apis-are-deprecated

    There is no confirmation regarding when the deprecated client APIs will be removed.  

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans