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 :
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 6

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?

I have the same question (0)
  • Leah Ju Profile Picture
    Microsoft Employee on at
    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
  • Salesian Profile Picture
    6 on at
    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
    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
    6 on at
    Could it be the Error Callback Message is conflicting with the workflow status message?
  • Leah Ju Profile Picture
    Microsoft Employee on at
    There are some possibilities.
    You can delete the previous js code and test it again.

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 55 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans