Skip to main content

Posts

Recent posts

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 );

ServiceNow group by disabled on new column in list view

ServiceNow group by disabled on new column in list view  https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715905#:~:text=In%20a%20list%20view%20you,menu%20item%20is%20greyed%20out In a list view you cannot use the "Group by" functionality on columns if the String type if their maximum lenght is greater that 255 characters. The "Group by" context menu item is greyed out. workaround : There is a workaround for this issue, which involves adding the  can_group  attribute to the affected column of the table. Navigate to  System Definition > Dictionary  and access the record name you wish to edit Open the record and click on  Advanced View  under  Related Links . In the  Attributes  field, add ' can_group=true ' as the value of the  Attributes  field (without quotes) and save.