web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

iPad opening account TypeError: null is not an object

(0) ShareShare
ReportReport
Posted on by 120

417641.Capture.JPG

When we open any account on an iPad, we now get this error message:

TypeError: null is not an object (evaluating 'document.getElementById(attributeName).style')

 

What does it mean?
How to fix it?

 

Thanks in advance for your help. 

*This post is locked for comments

I have the same question (0)
  • Julie Massin Profile Picture
    120 on at
    RE: iPad opening account TypeError: null is not an object

    Wonderful, we'll get on it asap.

  • Verified answer
    Hugo Silva Profile Picture
    1,374 on at
    RE: iPad opening account TypeError: null is not an object

    Hi Julie,

    You need to go to the form and click on the 3 dots and "Edit form", then go to "Form Properties" (the button on the top) -> verify if you have any javascript on the form on load and on save, double click on the file and verify is the there`s any "document.getElementById()" on the code, you should be using something more like (var recordId = Xrm.Page.data.entity.getId(); )

    To read the attribute you should user the XRM, this code "document.getElement" is not support by Microsoft.

  • Julie Massin Profile Picture
    120 on at
    RE: iPad opening account TypeError: null is not an object

    Thanks Hugo.

    It works fine under Safari.

    The error happens in CRM app only.

    In order to try your suggestions, what's the process to follow in order to edit the code?

    We have not edited codes ourselves yet.

  • Verified answer
    Hugo Silva Profile Picture
    1,374 on at
    RE: iPad opening account TypeError: null is not an object

    Hi Julie,

    Did you try in other other browser beside the Safari?

    What you could do to test this to put the code so it executes after the elements are defined, either with a DOM ready callback or place the source under the elements in the HTML.

    document.getElementById() returns null if the element couldn't be found. Property assignment can only occur on objects. null is not an object (contrary to what typeof says).

    On the Javascript validate if the attribute name exist first.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#3
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans