Triggering a business rule when updating work notes

Tim Grindlay
Kilo Sage

Hi, 

I have a business rule for a problem record that requires a future target date on save, otherwise it displays an error message and aborts. When comments or work notes are posted (using the post button) to the activity feed and the target date is in the past, the error message doesn't display, it just aborts and doesn't post the entry. 

If the user hits the save button they get the error message. If I use an onChange client script for the work notes field, the appears for every character typed in the field, not just when clicking the post button. 

Any help appreciated.

Tim

1 ACCEPTED SOLUTION

Tim Grindlay
Kilo Sage

Actually I found another way to achieve the requirement. I can simply add a client script, UI policy or business rule that can display an error message. 

View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Tim,

You may find below thread helpful (Refer to James comment).

https://community.servicenow.com/community?id=community_question&sys_id=27e78b2ddb1cdbc01dcaf3231f96...

 

- Pradeep Sharma

Thanks Pradeep, I had trouble finding relative posts so that was helpful. It sounds like DOM is the only way, and unfortunately that's not an option for me. 

I think that only leaves me with the alert error via onChange work notes client script. Not the best user experience but better than any other alternatives I can think of. 

I'll leave this question open for a few days for any other responses.

Tim Grindlay
Kilo Sage

Actually I found another way to achieve the requirement. I can simply add a client script, UI policy or business rule that can display an error message. 

Mounika Allaka
Tera Contributor

Hi Tim, 

 

Could you explain how did you do this.