Service...deRecord(3)
π¦ Service...deRecord(3) β the GlideRecord module, bestie edition
okay so this is a page from the User Contributed Perl Documentation, and it's literally all about the GlideRecord module β the Service-now Perl API - GlideRecord perl module. it's giving "object representation" energy, and we're about to unpack every single crumb. π
β¨ GlideRecord module β¨
An object representation of a GlideRecord object used to access your Service-now instance. yes, a GlideRecord that represents a GlideRecord. recursion? in my manpage? it's more likely than you think. π
π System Requirements π
The Service-now Perl API requires Perl 5.8 with the following modules installed β no skipping, bestie, the vibe check is mandatory:
SOAP::Lite(prerequisites http://soaplite.com/prereqs.html) 0.71 or laterCrypt::SSLeayIO::Socket::SSL
πΈ Constructor πΈ
new π
new(Configuration object, Table name, optional caller object)
$config = ServiceNow::Configuration->new();
$glideRecord = ServiceNow::GlideRecord->new($config,'incident',$me);
Constructor. Access to the ServiceNow Glide Record object. The caller object is optional β unless you're creating a Class that inherits GlideRecord (See any class in ServiceNow/ITIL for example). so like, if you're doing the inheritance thing, that caller object is not optional, periodt. π
π«Ά Subrotines π«Ά
(that's the original spelling, I'm not fixing it, I'm just respecting the source material π₯°)
insert π
insert(optional hash argument)
Example:
$glideRecord->insert();
Inserts glide record into Table. Returns sys id. boom. done. iconic.
setValue βοΈ
setValue(name, value)
Example:
$glideRecord->setValue('caller_id','56');
Sets element within Glide Record with name to specified value. Will not effect the GlideRecord within the Table until inserted or updated. so like... it's a pending glow-up, not a real one yet. π
addQuery π
addQuery(name, value)
Example:
$glideRecord->addQuery('number','INC1000014');
$glideRecord->query();
Refines query to include only the Glide Records with field name=value. narrowing the field, lowkey.
query π
query(optional hash arguments)
Example:
$glideRecord->query();
Returns all Glide Records in the Table with specified query. Step through the Records with the next() call. one at a time, no rushing, we walk. πΆββοΈ
next βοΈ
next()
Example:
if($glideRecord->next())
while($glideRecord->next())
Steps through the results of Glide Record query. Returns TRUE if more elements exist. and FALSE when the well runs dry, fr fr. π
update π
update(optional hash arguments)
Example:
$glideRecord->setValue('name','value');
$glideRecord->update();
Updates Glide Record in table with the Glide Record object. Changes to Glide Record object will not take effect until updated or inserted. Returns sys_id of record on success, undef of failure. so bestie β if you never update or insert, your changes are just β¨thoughts and prayersβ¨.
getValue π
getValue(name)
Example:
$glideRecord->getValue($name);
Get value of element name in GlideRecord. Returns string value of element.
getDisplayValue π«
getDisplayValue(name)
Example:
$glideRecord->getDisplayValue($name);
Gets display value of element name in GlideRecord. A display value would be the string name, instead of the sys_id in the case of a reference field, or the string value instead of the number value in the case of choice fields. it's giving "human-readable" realness. π
π okay bestie that's literally the whole page β every flag, every example, every crumb. go forth and query. π¦
this page was served up by perl v5.42.0, dated 2025-07-25 β and yes, Service...deRecord(3) really is the name, the dots are on purpose, they ate. π
π
π¦ where this page comes from
- fedora 43: perl-ServiceNow-API 1.01-38.fc43 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms