Skip to content

Instantly share code, notes, and snippets.

View iamwill's full-sized avatar

Will Leingang iamwill

View GitHub Profile
@iamwill
iamwill / debugging_cheatsheet.md
Last active April 19, 2024 01:24
Debugging on the Glide Platform

Debugging tips and tricks

Platform Troubleshooting

Console output too chatty?
Set com.glide.util.Log.developer_filter = true to cut down on non-interactive console log entries such as scheduled workers. (Don't forget to remove it when you're done!)

Utility urls

Note: Fast! These don't need a database.

@iamwill
iamwill / gliderecord_cheatsheet.md
Last active April 28, 2024 03:58
GlideRecord cheatsheet

GlideRecord & GlideAggregate Cheat Sheet ❗

GlideRecord(String tableName) ❗

var gr = new GlideRecord('incident'); // use the incident table
gr.query(); // fetch data from the database
while (gr.next()) { // advance
    gs.info(gr.short_description);
}

ServiceNow UI Developer cheat sheet


Utility URLs

URL Purpose
/stats.do Quick stats
/cache.do Clear your instance cache
<div class="panel panel-primary">
<div class="panel-heading">Request an item from the catalog</div>
<div class="panel-body">
<input class="form-control" type="search" placeholder="Start typing here to search the list of catalog items" ng-model="c.data.keywords" ng-change="c.server.update()" ng-model-options="{debounce: 250}" />
<h5 ng-if="!c.data.keywords">Showing the most popular items</h5>
<ul class="list-group result-container">
<li class="list-group-item" ng-repeat="item in c.data.items">
<a href ng-click="c.select(item.sys_id)"><category-icon category="item.category" style="margin-right: 10px"></category-icon>{{item.name}}</a><span class="pull-right">{{item.price}}</span>
<div class="catalog-item" ng-if="item.sys_id == c.openItem">
<sp-widget ng-if="c.catalogItemWidget" widget="c.catalogItemWidget" />