State Change to "New" – Info Message Requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited an hour ago
Hi team,
There is a requirement for the rm_enhancement table: whenever the state changes to "New", an informational message should be displayed to the user when they open the record( user will not open the record immediately), indicating that the state has been updated to New.
State will get changed by the script not manually updating the state
Currently, we do not have the option to create a new field to track this state change (e.g., a flag such as "state changed to New").
Please suggest possible approaches to implement this behavior without introducing a new field.
**We are not using rm_enhancement for Agile Story or anything related to Story
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
1)To create new enhancement following roles are required,
Before you begin
Role required: Any one of the feature_user, scrum_story_creator, scrum_admin, or rm_enhancement_admin roles
Ensure you are not assigning above roles to your end user so that they can create new.
2) To display a message every time an existing enhancement record is accessed, use a Client Script and check for the desired state.
- Table: rm_enhancement
- Type: OnLoad
function onLoad() {
var currentState = g_form.getValue('state');
if (currentState == '4') //update New state’s value
{
g_form.addInfoMessage("Your custom info message goes here.");
}
}
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
we are using rm_enhancement table for different use
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
57m ago
For getting the correct solution , you need to mention - for what purpose you are looking for this customization. what is the business justification for this requirement .
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
42m ago
Hey @shubhi_shubhi If auditing is enabled for the table, you could query the "sys_history_line" table in a script include for the change to "New" on an onLoad client script. Then show the message if the script include returns true.