Skip to main content

Notifications

Announcements

No record found.

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
    Praveen_e04 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
    Abdul Wahab 12,081 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
    Praveen_e04 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
    Inogic 438 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
    Abdul Wahab 12,081 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,436 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans