
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 10:08 AM
Anyone notice current.isNewRecord() no longer works? I have tested this using the below run as a background script in several instances including in a developer instance. The instances where running Helsinki Patch 5 and Istanbul Patch 1 and also Patch 2.
Just thought I would share just in case my marbles have finally rolled away...
var x = new GlideRecord("incident"); x.initalize(); x.setValue("caller", "2a6f81b60a0a3c2601ddac0243417d02"); x.insert(); gs.print(x.isNewRecord());
If other find otherwise on a Helsinki or Istanbul instance I would love to know the version.
var x = new GlideRecord("incident");
x.initalize();
x.setValue("caller", "2a6f81b60a0a3c2601ddac0243417d02");
gs.print(x.isNewRecord());
If
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2017 09:06 AM
Ok, so apparently something was "fixed" and this is not supposed to work for the script that I wrote and I am blind because the documentation says "but should not be used in background scripts" to indicate this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 10:32 AM
I know its not the rest of the code because before we upgrade to Helsinki it all worked fine and once I changed the check over to the !current.isValidRecord() it started working again as intended.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 10:40 AM
Interestingly enough I created a UI Action on the incident table with a condition of current.isNewRecord() and was able to confirm that it does work there.... So its not reliable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2017 09:06 AM
Ok, so apparently something was "fixed" and this is not supposed to work for the script that I wrote and I am blind because the documentation says "but should not be used in background scripts" to indicate this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-23-2017 09:47 AM
Haha! Happens to the best of us! But you taught me something