Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Get domain name based on the email id

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am creating a workflow where I need to check condition where the person is associated with the company based on email id & Company's url.

Eg:

Xyz Employee --> xyz@dynamics.com

Company url --> http://www.dynamics.com

So I need to check  xyz employee's email id "dynamics.com" matches company url id "dynamics.com"

Please help with the workflow or code.

*This post is locked for comments

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Get domain name based on the email id

    You can also create a JavaScript function to get the domain out of the email address, and then pass that to an action instead of workflow. You can use regular expressions to get the domain out of the email.

    You can call your action by using process.js, and have your action do the processing in the process window (not necessarily calling a .net plugin. This is in case you do not want to use plugin/.net code.

    You can also use webapi if you need to validate the domain information against a different entity, so I am not sure if you require the use of processes at all.

    Regardless which option you use: custom workflow, plugin or action, you will be required to do some coding.

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get domain name based on the email id

    Well I 'm new to custom workflow however will try doing thay and I didnt get about what I need to import  any links for better information on this.

  • Suggested answer
    Ivan Ficko Profile Picture
    Ivan Ficko 1,380 on at
    RE: Get domain name based on the email id

    Yes, it can be done via .NET code. You can make it via CRM plugin or custom workflow activity it's your choice or maybe you can try to import solution to your CRM instance:

    github.com/.../CRM-String-Workflow-Utilities

    and then use steps that are implemented there to compare values (email and company URL) by executing Regex Extract step for each field you need.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Get domain name based on the email id

    You mean in .net code.?..if I m not wrong you mean plugin how to do that ..?

    If there is better workaround please let me know or if you have some handy code please let me jnow

  • Suggested answer
    Ivan Ficko Profile Picture
    Ivan Ficko 1,380 on at
    RE: Get domain name based on the email id

    You can make a custom workflow step that will be triggered before the change of parent account field on customer entity that will throw InvalidPluginException if the condition is not met.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans