Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Javascript Unified Interface issue

Posted on by 1,086

Hi Partners, 

I'm having an issue and I don't figure out what could be. 

In my Dynamics 365 for CE online, I have a Unified Interface, on lead entity sometimes the Javascript works fine other not. so then my Javascrits functions stop working.

pastedimage1566926117658v1.png

at line 9 sometimes says "it can't read property addOnChange of null" but the field "rs_principal" exists and I'm not writing wrong, because sometimes it works well. (refreshing f5) even in other devices.

I'm using chrome. but with another browser happens the same , sometimes works other not. 

Can anyone help me? 

Dynamics 365 Online

Server Version: 9.1.0000.7625

Client Version: 1.3.2119-190813-224452

Thanks, regards. 

*This post is locked for comments

  • Matthew Tweed Profile Picture
    Matthew Tweed 10 on at
    RE: Javascript Unified Interface issue

    Xrm.Page is deprecated syntax and therefore will throw errors in UCI, if you change this to formContext it should change the behaviour as it is supported syntax.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
  • PabloCRP Profile Picture
    PabloCRP 1,086 on at
    RE: Javascript Unified Interface issue

    Hi Aric Levin,

    Yes, the behavior changes, Idk why on common Interface works well but it seems that in Unified Interfaces forces you to pass a context because of Xrm.Page is obsolete. Thank you.

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Javascript Unified Interface issue

    Can you see if changing from Xrm.Page.getAttribute to formContext.getAttribute changes the behavior?

    Take a look at the following link for using the new Client API reference:

    docs.microsoft.com/.../attributes

    Hope this helps.

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