Skip to main content

Notifications

Announcements

No record found.

Customer Service forum

Workflow to show options if conditions are met

Posted on by 445

Hi,

I am trying to figure this out.

In our Helpdesk system, the default 'From' field for new emails is the Technical Support alias and thats where the vast majority of emails sent should be sent from.

However, in certain situations a member of the team may need to send a message from their personal address or may have inadvertently used their email address as the 'From' address.

I need something that will show a warning when the personal email address is used instead of the tech Support address.

Something like, 'this email is being sent from (your) address, are you sure you wish to proceed? Yes No'

I can create a workflow to stop the email being sent no problem, but would a workflow be the answer to the problem above? Or will it be a Business Process or Javascript even?

Many thanks as always.

Ted

Categories:
  • Piotr Kalwasinski Profile Picture
    Piotr Kalwasinski 240 on at
    RE: Workflow to show options if conditions are met

    Hi,

    I would recommend to consider the alternative option, which would include both JavaScript and Workflow.

    The way I understand your problem is: the action user takes upon Email record via form while creating and sending email. How about considering replacing the Send button entirely? Custom button would process JavaScript function, which in turn would investigate value of the From field, process your business rule, and upon detecting potential issue, would present user with Confirm Dialog. If the JS would not detect issue with From field, it would simply send email unconditionally.

    Confirm Dialog:

    https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/jj602956(v=crm.8)#BKMK_confirmDialog

    Ribbon Button:

    https://community.dynamics.com/crm/f/117/t/185643

    Send Email via JS:

    https://community.dynamics.com/crm/f/117/t/255781

    I hope this helps,

    Piotr

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Workflow to show options if conditions are met

    Register a javascript handler on load of email form and on change of 'From' field (Party List).

    In the javascript, check if From does not contain Technical Support email and display confirm dialogue.

    If the response of confirm dialogue is No, clear the value in 'From'.

  • Suggested answer
    Justin Wilkinson Profile Picture
    Justin Wilkinson 1,336 on at
    RE: Workflow to show options if conditions are met

    ok so what might work is creating a Y/N button on your form, updating the workflow t by adding a step to only show the warning message if No is selected based on the email conditions. by default the field will be No so users will have to select Yes otherwise they will get the error popup

    as an idea?

  • TedW Profile Picture
    TedW 445 on at
    RE: Workflow to show options if conditions are met

    Thanks Justin, thats what I have already, what I need is an option in that error message to say Continue or Cancel, to proceed with sending the email or not.

  • Justin Wilkinson Profile Picture
    Justin Wilkinson 1,336 on at
    RE: Workflow to show options if conditions are met

    an-example-of-this.png

    this is an example if you have the message pop up on cancellation of a process 

  • Suggested answer
    Justin Wilkinson Profile Picture
    Justin Wilkinson 1,336 on at
    RE: Workflow to show options if conditions are met

    Hi Ted, the following thread might give you some ideas: community.dynamics.com/.../152348

    you can defiantly show a cancelled workflow message as an example  

  • TedW Profile Picture
    TedW 445 on at
    RE: Workflow to show options if conditions are met

    Hi Justin thanks for your suggestion, the schema name is definitely correct. I can do what you suggested and have done in a workflow, but that is to stop the email being sent. I need to add a warning to the error message and allow the user the option to continue if they wish.

    Many Thanks

  • Suggested answer
    Justin Wilkinson Profile Picture
    Justin Wilkinson 1,336 on at
    RE: Workflow to show options if conditions are met

    you need to try and run the workflow on emails as the primary entity select the field from (maybe it has a different schema name) then select  check if ..."does not contain" Work email then show error message

    I suggest you also use level up addin for chrome to get the schema name / display name in case they are different

  • TedW Profile Picture
    TedW 445 on at
    RE: Workflow to show options if conditions are met

    Hi, thanks, but I cant select the 'From' field in the Business Rule. If I create the business rule based on the Email Entity, I cant see the From field there...

  • Suggested answer
    Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Workflow to show options if conditions are met

    The best way to do this would be to use a Business Rule to set an alert on emails where From != the support email address.  

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans