Skip to main content

Posts

Recent posts

ServiceNow: Managing the active/inactive state with TaskStateUtil

 ServiceNow: Managing the active/inactive state with TaskStateUtil ServiceNow: Managing the active/inactive state with TaskStateUtil > ServiceNow has its own Active state management logic for anything that extends the Task table.  TaskStateUtil - Global . You shouldn’t create Business Rules which manage the Active field on any tables that extend task. You can just modify the dictionary attributes if you want to modify the default behavior

ServiceNow Using GlideQuery Instead of GlideRecord

 ServiceNow Using GlideQuery Instead of GlideRecord "The  GlideQuery  API is an alternative to  GlideRecord  to perform CRUD operations on record data from server-side scripts. The  GlideQuery  API lets you: Use standard JavaScript objects and types for queries and results. Quickly diagnose query errors with additional checks and clear error messages. Simplify your code by avoiding boiler-plate query patterns. Avoid common performance issues without needing deeper knowledge of GlideRecord. Use the  GlideQuery  API in scoped or global server-side scripts. When used within a scoped app, it must be prefixed with the global scope." https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/server/no-namespace/GlideQueryGlobalAPI#GQ-disableWorkflow

ServiceNow Force Scheduled Job into Update Set

ServiceNow Force Scheduled Job into Update Set 2 approaches: - use the 'force to update set' button which is a utility available on the Share: Force to update set UI Action - use the following approach:  Add Scheduled Job to Update Set basically, for the second approach: Make the update set you want to capture this your current update set and just run this background script     var gr = new GlideRecord ( 'sysauto_script' ) ; gr . get ( '<sys_id of your scheduled job>' ) ; var gum = new GlideUpdateManager2 ( ) ; gum . saveRecord ( gr ) ; It will get captured in your current update set.

ServiceNow how the email notification subject is set in email templates

 ServiceNow how the email notification subject is set in email templates Upon inspecting the what is contains tab of the notification and noticing that the subject field is left empty, but the subject is being populated when you preview the notification, it may be that this is being set in the email template. On the email notification click the 'email templates' UI action and look for something containing something similar to below: email . setSubject ( Your Approval is required as Manager for request ' + number + ' for ' + application );