- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 08:25 AM
Hi,
created one field on incident - Test Date, When assignment group changes - time stamp populate on that field.The problem here is activities updating two times.
Business Rule - After - update
Script: current.u_test_date = gs.nowDateTime();
current.update();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 09:02 AM - edited 09-22-2023 09:03 AM
Hi @Shaik22
Can you try using Before BR ?
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 08:49 AM
Hi @Shaik22
In script no need to use current.update() and not recommended to use current.update()
Below code is enough.
Script: current.u_test_date = gs.nowDateTime();
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 08:56 AM
@Vishal Birajdar it creates only one activity when i remove current.update() but it is not update the timestamp in the field.Please see attached screenshot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2023 09:02 AM - edited 09-22-2023 09:03 AM
Hi @Shaik22
Can you try using Before BR ?
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates