Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

JavaScript error onload in Account form

(0) ShareShare
ReportReport
Posted on by 60

Hi,

Our contractor wrote a javascript function to format the phone number field in the Account form. I tried to reuse the same function in another Account form, which I thought worked fine.

But, now I am randomly getting Script error on some accounts, which doesn't happen every time - See screenshot below.

 7206.PNG

I am not sure what the issue and I am new to JavaScript as well.

Any help is much appreciated.

Thanks,

Praveen.

  • Praveen_e04 Profile Picture
    60 on at
    RE: JavaScript error onload in Account form

    Hi Abdul,

    How to close this thread as completed?

    Thanks,

    Praveen.

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: JavaScript error onload in Account form

    Hi Praveen_e04,

    Please mark this thread as completed.

    Thanks

    Abdul Wahab

  • Verified answer
    Praveen_e04 Profile Picture
    60 on at
    RE: JavaScript error onload in Account form

    Hi Abdul and Roohi,

    My apologies for the late response. I found the issue. There was an existing script on the same field, which was supposed to be gone, but somehow got in there. I removed it and worked well.

    Thanks for your replies.

    - Praveen.

  • Suggested answer
    Inogic Profile Picture
    523 on at
    RE: JavaScript error onload in Account form
    Hi Praveen,
    The value which is being assigned to the Phone number field should be valid or have value in the phone number. In your case, the Phone number field values for some of the accounts might be invalid or does not have value in the phone number and hence you are getting an error. Please make sure that the value that you are trying to format is of a type supported by the Phone number field.
    In case, you are still facing the issue then please share the code which you are using for formatting.
    Hope this helps!
  • Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: JavaScript error onload in Account form

    Hi Praveen_e04,

    Please share the code & column on which you need formatting.

    Thanks

    Regards,

    Abdul Wahab

    CRM Team Lead

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 181 Super User 2025 Season 1

#2
Siv Sagar Profile Picture

Siv Sagar 149 Super User 2025 Season 1

#3
Vahid Ghafarpour Profile Picture

Vahid Ghafarpour 124 Super User 2025 Season 1

Product updates

Dynamics 365 release plans