Skip to content

Instantly share code, notes, and snippets.

View SathiskumarD's full-sized avatar
🎯
Focusing

Sathiskumar Dharmalingam SathiskumarD

🎯
Focusing
View GitHub Profile

ServiceNow - Jelly scripting cheatsheet

UI Page consists of jelly, client script and processing script. UI Macro has the jelly script only (but client script can be injected in jelly script) Usages:

  • Open as a page using URI https://<instance_name>.service-now/<ui_page_name>.do
  • Open as a modal using client script (UI action, client script, etc) (see snippet 1)
// Snippet 1
var gm = new GlideModal('UI_dialog_name');
gm.setTitle('Show title');
@SathiskumarD
SathiskumarD / BackfillAssignmentGroup.SI
Created September 17, 2023 02:53 — forked from kcimpulse/BackfillAssignmentGroup.SI
ServiceNow - Script Includes - Backfill Assignment Group if user is selected first. & Update to Task Table, Assignment Group Refrence Field
var BackfillAssignmentGroup = Class.create();
BackfillAssignmentGroup.prototype = {
initialize: function() {
}, BackfillAssignmentGroup:function() {
var gp = [];
var a = current.assigned_to; //sys_user_grmember has the user to group relationship
var grp = new GlideRecord('sys_user_grmember');
if(a){
grp.addQuery('user',a);
}
@SathiskumarD
SathiskumarD / gliderecord_cheatsheet.md
Created February 12, 2023 15:10 — forked from iamwill/gliderecord_cheatsheet.md
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);
}
@SathiskumarD
SathiskumarD / git_and_github_instructions.md
Created April 7, 2020 00:27 — forked from mindplace/git_and_github_instructions.md
Pushing your first project to github

Make sure git is tracking your project.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase.

You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.

Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  1. Check if git is already initialized: git status
@SathiskumarD
SathiskumarD / form-reset.css
Created November 25, 2019 13:46 — forked from colevscode/form-reset.css
Formspree universal form styles
/* reset */
form input,
form select,
form textarea,
form fieldset,
form optgroup,
form label,
.StripeElement {
font-family: inherit;
font-size: 100%;