- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 06:57 AM
Hi All,
I want to display an info message to add attachment whenever the knowledge article is in draft stage
Please provide the client script to add workflow as draft
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 07:04 AM - edited 05-15-2025 07:06 AM
You can simple create an on load client script with below script:
if(g_form.getValue("workflow_state")=="draft"){
g_form.addInfoMessage("Please add attachment");
}
Client script configuration:
You can also achieve same by using UI policy also.
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 07:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 07:01 AM
You can create an on load script on KB table and add code like
g_form.addInfoMessage("This article in in draft state")
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 07:02 AM
This is easy way Create a UI policy
State = Draft
in Script add
above code.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 07:22 AM
Thanks Atul.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2025 07:04 AM - edited 05-15-2025 07:06 AM
You can simple create an on load client script with below script:
if(g_form.getValue("workflow_state")=="draft"){
g_form.addInfoMessage("Please add attachment");
}
Client script configuration:
You can also achieve same by using UI policy also.
Regards,
Abhijit
ServiceNow MVP

