How can I easily identify which business rule/script is pasting a comment ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 02:28 AM - edited 12-12-2023 02:30 AM
Hello All
I have a business rule/script running that automatically past this external comment when I remove the cmdb_ci attached to a task "Server xxxx removed".
I'm trying to identify which script is doing this but I didn't find it.
Do you know an easy way to quickly find out ? In the logs maybe ?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 02:33 AM
Hi @Jerome MAISETTI ,
you can use the Script Tracer in ServiceNow to help identify which scripts, business rules, or other script-related components are being executed during a specific action or event. The Script Tracer provides a detailed log of script execution, making it a valuable tool for debugging and understanding the flow of scripts.
Here's how you can use the Script Tracer:
Navigate to Script Tracer:
- Go to System Diagnostics > Script Tracer in the application navigator.
Configure Script Tracer:
- Select the table where the action is taking place (e.g., task or your custom table).
- Choose the action you want to trace (e.g., update).
- Define any additional criteria to narrow down the trace.
Start Script Tracer:
- Click the "Start Tracing" button.
Perform the Action:
- Now, go to the record (task) and perform the action that triggers the external comment (e.g., removing the cmdb_ci).
Stop Script Tracer:
- After performing the action, go back to the Script Tracer and click "Stop Tracing."
Review Trace Results:
- The Script Tracer will provide a detailed log of all the scripts and business rules that were executed during the specified action. Look for entries related to the cmdb_ci removal and the addition of the external comment.
Analyze Execution Flow:
- Examine the trace results to understand the sequence of script execution. This can help you identify the specific script or business rule responsible for adding the external comment.
Investigate Scripts:
- Once you identify the relevant scripts, go to the corresponding business rules, script includes, or other script components to investigate and make necessary changes.
Remember to use the Script Tracer judiciously, especially in a production environment, as it can generate a substantial amount of information. Additionally, ensure that you have the necessary permissions to access and use the Script Tracer in your ServiceNow instance.
Please mark ✅ Correct if this resolves your issue, and also mark 👍 Helpful if you find my response valuable based on its impact.
Regards,
Astik Thombare

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 02:33 AM
Hi,
You can search for 'fixed Text' in your business rules table.
Can you please share the screenshot of message?
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 02:48 AM
Hi @Jerome MAISETTI ,
The message is displayed as part of "Relationship Changes" activity enabled on activity log. We cannot modify this message as it belongs to product but you can manage visibility of Relationship changes in Activity log by configuring activity fields property.
Unfortunately, the logic which displays this message is internal to the product and it is not possible to modify the message displayed.
You can find more details about this on below KB article.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0996224
Thanks
Anil Lande