原创 Best Practices in SNOW Development

1. Before Business Rules should not update() or insert() records on other tablesCoding Standards : To ensure data integr

原创 Make template available for multiple groups

I added a GlideList field called Groups (u_groups) at the template form. Added the following to ACL sys_template read

原创 Querying Service Catalog Tables

ServiceNow開發中我們在寫代碼查詢request_item表時,經常會遇到想要根據variable的值來作爲查詢條件。但是官方文檔有強調: You cannot directly query the variables of the

原创 爲原始表添加或修改擴展表Extends table

疫情期間也發個帖子,證明我們依舊小強。 免責聲明: 如果你創建了一個新表後發現沒有擴展自某表,建議刪除重建,刪除重建需要分別使用兩個update set保存,否則更新到UAT或者PROD環境看不到,後果請自負。 使用代碼添加或修改擴展表是

原创 高級乾貨之如何顯示當前Service Portal每個widget耗時

原文出處:https://hi.service-now.com/kb_view.do?sysparm_article=KB0744521 在瀏覽器使用F12調出控制檯並輸入如下腳本,即可顯示每個widget的加載耗時。

原创 關於版本升級導致原始工作頁面無法Submit情況說明

項目忙!!!!懶癌發作!!!!不想新打字!!!!同學開心就好!!!!

原创 關於在ui page怎麼通過一個button觸發processing script

當我們在ui page想要執行服務端腳本的時候,就得在processing script編寫我們的服務端腳本,但是想要ui page去運行processing script有幾個前提條件。1、我們必須要有一個form表單且tag爲<g:ui

原创 Best Practices in development

1. Before Business Rules should not update() or insert() records on other tablesCoding Standards : To ensure data integr

原创 關於Portal的 Keywords Widget 無法自動重置filter的解決方案

ServiceNow portal端的開箱表格組件支持Keywords搜索功能。ServiceNow前臺Portal和後臺都是支持keywords搜索的(for text, query filter is '123TEXTQUERY321=

原创 關於如何刪除非Global狀態下自定義表的方法

當我們在非Global狀態下創建了不正確的table之後,使用普通方法是無法刪除該table的,即delete按鈕都不存在。該操作很早之前也被其他人提出,認爲是BUG。 https://hi.service-now.com/kb_view.

原创 Edit type of email validation

function validate(value) {if (value == null || value == ""){return true;}if(value.indexOf(",")!=-1){var arr=value.split

原创 report widget not working for external users

Published report on service portal report widget not working for external users (snc_external) "Security constraints pre

原创 ServiceNow 中關於UI Action 在portal端的使用

在 portal端是可以使用Form和UI Action的,例如:var data.f= $sp.getForm();//需要添加上相應參數在開箱組件'Form'的Server script中就有如下代碼:data.f = $sp.getF

原创 ServiceNow 中的權限設置

所謂權限控制,無非就是限制系統中的部分用戶增刪改查表或者字段的過程。 在新建一個table時,我們會看到一個 ‘Create access controls’和’User role‘ ,如下圖: ![](https

原创 Reload a Form or Related list from a Client Script

https://www.servicenowguru.com/scripting/client-scripts-scripting/reload-form-related-list-client-script/his post comes