This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // type: sys_ui_action | |
| // name: Open Relationship | |
| // table: sys_ui_related_list_entry | |
| // onclick: _<ui_action_sys_id>() eg: _7d3f6d1947e2b6105295e49b506d43e9() | |
| // condition: current.related_list.toString().startsWith("REL:") && current.related_list.toString().length === 36 | |
| // flags: client, show update, form link, list context menu | |
| async function _7d3f6d1947e2b6105295e49b506d43e9() { | |
| let table, id; | |
| if (globalThis.g_list && globalThis.g_sysId) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*jshint esversion: 6 */ | |
| (function () { | |
| function getReferences(table) { | |
| var result = []; | |
| var gr = new GlideRecord("sys_dictionary"); | |
| var query = [ | |
| ["nameSTARTSWITHcmdb_ci", "element!=model_id"], | |
| [ | |
| "glidefunction:substring(name, 1, 7)!=cmdb_ci", | |
| "glidefunction:substring(name, 1, 5)!=var__", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (async () => { | |
| if (!g_form) return; | |
| const map = { | |
| sys_hub_action_instance_v2: "values", | |
| sys_hub_flow_logic_instance_v2: "values", | |
| sys_hub_sub_flow_instance_v2: "subflow_inputs", | |
| sys_hub_trigger_instance_v2: "trigger_inputs", | |
| sys_flow_context_inputs_chunk: "data", | |
| }; | |
| const table = g_form.getTableName(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Find all store applications that have a newer version available | |
| * exclude apps with compatibility issues | |
| * create a batch install plan to update them to the latest version | |
| * pass the plan to sn_appclient.AppManagerAPI.installBatch | |
| */ | |
| var result = (function () { | |
| new sn_appclient.UpdateChecker().checkAvailableUpdates(); | |
| var storeApp = new GlideRecord("sys_store_app"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Example usage | |
| * | |
| * function onChange(control, oldValue, newValue, isLoading) { | |
| * if (isLoading || newValue == "") { | |
| * return; | |
| * } | |
| * | |
| * var ajax = new GlideAjax("SimpleQueryAjax"); | |
| * ajax.addParam( |