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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Hi,I want to write a javascript for email validation in crm . How can I do that? where to write how to integrate etc

(0) ShareShare
ReportReport
Posted on by 2,654

I want to write a javascript for email validation in crm . How can I do that? where to write how to integrate etc

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    What exactly your need? do you need to validate the email attribute in your from?

    if that is your question, first solution is when you create the field you can set the Type as Single Line of Text, and for Format select E-mail.

    For cases where you need to validate a proper e-mail address with a Fully Qualified Domain

    Name (FQDN) or if you need to accept only e-mail addresses from a specific domain, use the

    following block of JavaScript code in the Onchange event of the field :

    function checkEmail(emailField)

    {

    var email=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([azA-

    Z])+/;

    if(email.test(emailField))

    {

    // alert("true");

    return true;

    }

    }

  • Suggested answer
    Community Member Profile Picture
    on at

    I want to write a javascript for email validation in crm. But i want match email for only one mail address , whenever i want to fill any other email address then alert message can pop up but when I fill valid email then it can be accepted e.g. I write xyz@gmail.com then show me alert but when I write xyz@hotmail.com then it will never alert it can accepted.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans