How to create alert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2023 02:37 AM
Hello Exports,
How to show alert before create a standard change from portal and instance.?
Using On submit client script i have created a alert for single item. its working fine.
Requirment.
1.We have separate category for standard change request.
want to create alert based on category or hole change templates for the portal.
before.
Kindly support to achieve this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2023 04:33 AM
Hi @akin9 ,
Hope you are doing great.
To display an alert before creating a standard change from the portal and instance in ServiceNow, you can follow these steps:
Identify the specific category or change template that you want to trigger the alert for. Ensure that you have the necessary permissions to modify the portal and instance settings.
Access the ServiceNow portal and navigate to the relevant change request category or template section.
Locate the form or script associated with the creation of a standard change within that category or template.
Modify the on-submit client script associated with the form to include the alert functionality. This script will execute when the user attempts to submit the change request.
Write the code within the on-submit client script to display the desired alert message. Ensure that the code is placed appropriately within the script and is executed before the change request is created.
function onSubmit() {
if (g_form.getValue('category') === 'Standard Change' || g_form.getValue('template') === 'Standard Change Template') {
// Display the alert to the user
alert('Please note that creating a standard change requires proper authorization and adherence to established procedures.');
}
return true;
}
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2023 05:12 AM
Hello @Riya Verma ,
Im doing good , Thank you for Quick reply!
Need to create onchange client script for Change_request table or sc_cat_item table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2023 06:02 AM
@akin9 , you can try writting in sc_cat_item only because after submission of catalog the record change record will get created on Server side only
Regards,
Riya Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2023 07:22 AM