- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2021 03:13 AM
Hello,
I wrote a script where I can check if a record exists with the following condition and it is not able to find.
var methods = new GlideRecord("incident");
var returnValue = methods.get("caller_id", "Bud Richman");
gs.addInfoMessage("the record that is to be returned is available " + returnValue);
It is returning false even though there is record with the scenario
Regards
Suman P.
Solved! Go to Solution.
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2021 03:14 AM
Hi there,
methods.get("caller_id", "Bud Richman");
caller_id is a reference, so sys_id. You are searching on a string though. That won't work.
So either search on the sys_id, or use caller_id.name
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2021 03:24 AM
Got it Ankur. It worked. Thanks Mark.
Regards
Suman P.