Distinguish new record and updated record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2012 05:03 AM
How can I identify newly created record and updated record using javascript query
thanks
sandip
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2012 05:07 AM
Client Script (end user browser): use g_form.isNewRecord() function. More info is here:
http://wiki.service-now.com/index.php?title=GlideForm_%28g_form%29#isNewRecord
Business Rule (server-side): current.operation() method. For example:
if (current.operation() == 'insert')
{
// just inserted a record
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2012 05:08 AM
client side: g_form.isNewRecord()
server side: current.isValidRecord()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2012 05:21 AM
This SNGuru post shows how to use both the client-side and server-side methods.
http://www.servicenowguru.com/scripting/client-scripts-scripting/testing-valid-record/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2012 05:36 AM
I have written the following query
sys_created_onBETWEENjavascript:gs.dateGenerate('2012-04-25','00:00:00')@javascript:gs.dateGenerate('2012-04-25','23:59:59')
But I want to get updated record then how can I write the query??
Thanks,
Sandip