Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Upgrading JavaScript from v8.2 On Premise to v9 Online

Posted on by 255

I am migrating from 8.2 On Premise to v9 Online.

I have run the Dynamics 365 V9 Javascript Validator in the XrmToolbox and can see a number of issues. 

They are:

  1. Method Xrm.Page must be replace with ExecutionContext.getFormContext
  2. Method Xrm.Page.context must be replace with Xrm.Utility.getGlobalContext
  3. Method Xrm.Page.context.getUserId must be replace with globalContext.userSettings.userId
  4. Method Xrm.Page.context.getUserName must be replace with globalContext.userSettings.userName
  5. Method confirmDialog must be replace with Xrm.Navigation.openConfirmDialog
  6. Method alertDialog must be replace with Xrm.Navigation.openAlertDialog
  7. Method openEntityForm must be replace with Xrm.Navigation.openForm
  8. A SOAP messages is detected. This must be replace with Use a custom control

To me it looks like 1-7 all relate to the deprecation of Xrm.Page.  Looking at the documentation it is not 100% clear that this is the case for all 7 and wanted to check with the forum that my plan to push the solutions into v9 will be fine and that we can update all these issues post migration without anything breaking?

There are numerous instances of no 8 on our solution.  The English in the tool is not great.  My expectation would be that these SOAP elements will work also but that there is likely a newer technique that would be recommended.  Again can I deal with these in the future, post migration?

*This post is locked for comments

  • gordonj Profile Picture
    gordonj 255 on at
    RE: Upgrading JavaScript from v8.2 On Premise to v9 Online

    Thank you guys.  Those are some really useful resources for understanding the new model.

    As far as I can tell the existing code will continue to work through the migration for the time being.  That means my first step will be to migrate and I can expect our system to continue to function.

    Then we can plan out updating the deprecated code.

  • Verified answer
    Kokulan Profile Picture
    Kokulan 18,048 on at
  • Verified answer
    Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Upgrading JavaScript from v8.2 On Premise to v9 Online

    Go to below link and read each topic. It will give you better idea:

    docs.microsoft.com/.../reference

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans