Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Unanswered

Pop out an error dialog box message when trying to resolve a case, when a field is empty.

(0) ShareShare
ReportReport
Posted on by

Hi, I am looking for a JavaScript solution for the following scenario:

In the case form, when we click on “Resolve Case” button, it will check if a text field has data being updated or not. If it is blank, a message should pop-up and it should not allow to resolve the case until the field has been updated. Note: the field is not mandatory, but it needs to be filled before resolving

Currently we are using Ribbon Workbench, we used Run workflow and in the Error Callback JavaScript we added Xrm.Navigation.openAlertDialog({text: /Cannot resolve this case. Possible Cause: Please check if all child cases has been resolved/}); but still this does not check the condition.

Is there any possibility where we can achieve this with JavaScript code?

  • Leah Ju Profile Picture
    Microsoft Employee on at
    Pop out an error dialog box message when trying to resolve a case, when a field is empty.
    There are some possibilities.
    You can delete the previous js code and test it again.
  • Salesian Profile Picture
    on at
    Pop out an error dialog box message when trying to resolve a case, when a field is empty.
    Could it be the Error Callback Message is conflicting with the workflow status message?
  • Leah Ju Profile Picture
    Microsoft Employee on at
    Pop out an error dialog box message when trying to resolve a case, when a field is empty.
    Hi Salesian,
    It's so strange!
    Maybe you can try to copy it to create another workflow to test again.
    Or try to create one new workflow on other entities to check if the same situation occurs.
  • Salesian Profile Picture
    on at
    Pop out an error dialog box message when trying to resolve a case, when a field is empty.
    Hi Leah,

    Thank you so much, this is helpful.

    I have implemented the steps you shared.
    It is working, the cases are not being resolve when the field does not contain data.
    However, the error message is not popping out.
    Just as you had instructed, I have followed all the steps, I included the value as well under the set properties for the stop workflow with status of cancelled.
    Can you please help on this?
  • Leah Ju Profile Picture
    Microsoft Employee on at
    Pop out an error dialog box message when trying to resolve a case, when a field is empty.
    Hi Salesian,
    Why not use workflow to get there directly?
    We can do this by using a Real-time (synchronous) workflow which triggers after a status change.
    Go to Settings > Process.
    1)Create one workflow on case entity:
    2)Trigger: 
    3)Add steps:
    --Condition:
    --Add a Stop Workflow step with a status of Cancelled
    4)Save and active.
    When your condition is True, this workflow will create an error message, and because the workflow is synchronous, it will also prevent the status from changing to Resolved.

    I hope you can mark my answer verified if it is helpful! If you have any questions, please feel free to contact me.
    Regards,
    Leah

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans