Skip to main content
Post a question

Notifications

Community site session details

Community site session details

Session Id : lXsVg8e9d0RYxOzyi4uX4B
Microsoft Dynamics CRM (Archived)

Get domain name based on the email id

Like (0) ShareShare
ReportReport
Posted on 3 Nov 2017 10:56:50 by

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
    30,188 Moderator on 05 Nov 2017 at 01:52:35
    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
    on 04 Nov 2017 at 08:32:15
    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
    1,380 on 03 Nov 2017 at 13:58:14
    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
    on 03 Nov 2017 at 13:01:23
    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
    1,380 on 03 Nov 2017 at 12:10:56
    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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March 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... 293,440 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,575 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Loading complete