Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Consolidating error messages in real-time workflow

Posted on by 245

Hi,

I'm using a real-time workflow to perform validation when updating my entity. The validation is performing a lot of checking in multiple fields and related entities. Currently, our workflow is canceling and displaying the error message, synchronously if the validation failed (e.g. Surname is empty). 

Our business is requesting if it is possible to collate all error messages first, instead of displaying one by one. For example, if Surname and Firstname are required, it will list the error messages below

  • Surname is required
  • Firstname is required

Instead of displaying individually, and performing another validation.

Is this possible using real-time workflow?

*This post is locked for comments

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Consolidating error messages in real-time workflow

    I have wiki but it doesn't cover the subject. Following post describes how I used combine in different scenario - butenko.pro/.../howto-send-record-url-pointing-to-specific-model-driven-apps but in your situation you will combine string outputs from your validation actions.

  • Suggested answer
    Wayne Walton Profile Picture
    Wayne Walton 13,726 on at
    RE: Consolidating error messages in real-time workflow

    I don't think that's possible, because it's going to quit on the first step it fails on.  Instead, why no use Business Rules and set up an alert for each field that is required?  It will be clearer that way, anyway.

  • RE: Consolidating error messages in real-time workflow

    Ok, do you have documentation on how to you’re custom workflow?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Consolidating error messages in real-time workflow

    I have never done anything similar so I don't have a demo that I can demonstrate.

    Actually my toolkit is needed only for string concatenation. All remaining pieces are completed using OOB worklfows/actions.

    I would recommend start doing from the example of 2 fields and increase the number once 2 fields example works.

    And I'm here to help you.

  • RE: Consolidating error messages in real-time workflow

    Thanks Andrew, unfortunately, I have a lot of fields to validate, and some are also on related entities. Do you have a sample demo on how to use your toolkit, like screencast or video?

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Consolidating error messages in real-time workflow

    Hello,

    If you have only 2 conditions to check it should not be a big deal using OOB workflow. Workflow should look like following:

    if (surname is blank and first name is blank)

    then stop workflow with error that surname and firstname are blank

    else if (surname is blank)

    then stop workflow with error that surname is blank

    else if (firstname is blank)

    then stop workflow with error that firstname is blank

    But if you have many conditions that can turn to an issue.

    In such situation I can recommend following:

    Convert all your validations to an action - 1 action per validation. Action should have 2 outputs - boolean - if validation successful and error message (like "Surname is required").

    Sequentially call you validation actions and after use "or" between boolean outputs. If any of validation failed you can concatenate error message to one using one of steps from my workflow toolkit (you can find url in my signature) and after you can stop workflow using concatenated message.

    Feel free to ask questions if something is not clear.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans