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)

How can I create popup alerts as part of a workflow process?

(0) ShareShare
ReportReport
Posted on by 405

I have a workflow that sends an email containing values from several fields. However, if the fields are blank or don't meet certain criteria, I want the workflow to stop, and most importantly, I want an alert to be displayed that lets the user know (preferably in real time) that the workflow is going to be canceled, and they should go back and correct those fields. To put it another way, I want conditional alerts, i.e., if certain conditions are present, I want to display an alert to the user. Ideas?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mithilesh Kumar Profile Picture
    10,047 on at

    Hi Franco,

    Since you are talking about making fields mandatory, I would not suggest to make them using the OOB functionality.

    You can make the fields Business Required. This will not allow the user to Save the record until those fields are entered.

    You can also check the criteria for the fields using JScript and if the condition is not met you can alert the User to correct those fields.

    Since Workflow has trigger point you can always stop them to hit by not Saving the record.

    Hope that helps

    Thanks

  • Aileen Gusni Profile Picture
    44,524 on at

    Franco,

    If you are using CRM 2013 and above you can have Real Time workflow that can help you validate the process and cancel it if the fields are blank or don't meet certain criteria.

    Making the field as mandatory might be a solution to you prompt user that should key in this field, but in some point this field is not necessary to set as mandatory, for example you have case: if Account industry is IT then you need to make sure that the salesperson key in the Number of Consultant, for example, by making it as mandatory.

    If Account industry is Agriculture then the Number of Consultant field of course is not mandatory, instead, maybe you need another number like total size of field in hectare or who is their Farm Supplier, etc. And if Account industry is Food then you need Best Chef Name, for instance only.

    So the conditions is can be various. Which you can use Business Rule or JavaScript as well.

    But, if you already create your own process in the workflow, then you can utilize workflow for validation purpose.

    Here are the useful example:

    garethtuckercrm.com/.../crm-2013-new-features-using-real-time-workflow-for-validation-rules

    nakedcrm.wordpress.com/.../using-workflows-to-validate-records-to-prevent-creates-updatesassign-and-deletes

    It will help to prompt user based on certain conditions + cancel the workflow as well, meaning that not finishing the execution as completed.

    But there are things you need to aware that the prompt only works for Real Time Workflow, otherwise it would only cancel the workflow without notification, and if you are not using CRM 2011 and above, you cannot have this feature, then it will only triggered in some condition after save, for example field change, created, etc based on workflow trigger point. And you cannot have condition based on child records.

    Hope this helps.

    Thank you.

  • Suggested answer
    Franco Prussian Profile Picture
    405 on at

    Thank you both for the suggestions. You gave me some good ideas that led to final solution: I used conditional statements in the workflow, so if the right conditions are not present, it will stop the workflow as canceled. I put a custom message into the cancellation properties so that when the workflow stops, CRM displays an alert which tells the user why it failed. I am using a real time workflow.

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