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

Announcements

No record found.

News and Announcements icon
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.

I have the same question (0)
  • Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Praveen_e04,

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

    Thanks

    Regards,

    Abdul Wahab

    CRM Team Lead

  • Suggested answer
    Inogic Profile Picture
    764 on at
    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!
  • Verified answer
    Praveen_e04 Profile Picture
    60 on at

    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
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Praveen_e04,

    Please mark this thread as completed.

    Thanks

    Abdul Wahab

  • Praveen_e04 Profile Picture
    60 on at

    Hi Abdul,

    How to close this thread as completed?

    Thanks,

    Praveen.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
11manish Profile Picture

11manish 91

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 78 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 55 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans