Skip to main content

Posts

Recent posts

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.

ServiceNow DECISION TABLES

 ServiceNow DECISION TABLES Use decisions tables to help you reach outcomes that depend on multiple factors. In these tables, each factor is a decision input see  https://docs.servicenow.com/bundle/vancouver-application-development/page/administer/decision-table/concept/decision-table.html

ServiceNow Get All Fields in a GlideRecord

 ServiceNow Get All Fields in a GlideRecord var grAccount = new GlideRecord ( 'x_cls_clear_skye_i_account' ); if ( grAccount . get ( 'sys_id' , '833aeabc1bfbbd10f4b15421604bcb8b' )){ var aFields = grAccount . getFields (); for ( var i = 0 ; i < aFields . size (); i ++) { var glideElement = aFields . get ( i ); if ( glideElement . hasValue ()) { gs . print ( ' ' + glideElement . getName () + '\t' + glideElement ); } } }

ServiceNow How to Get Instance URL Server Side in Scoped App

 ServiceNow How to Get Instance URL Server Side in Scoped App when running the following in a fix script in scoped application  //--check for prod URL and cancel out var env = gs . getProperty ( 'glide.servlet.uri' ); gs . info ( 'rds_del_account_profile_identity::URL=' + env ); if ( env . indexOf ( 'prod.service-now.com' ) > - 1 ) { gs . info ( 'rds_del_account_profile_identity::Not to be run on prod!!' ); } else { gs . info ( 'rds_del_account_profile_identity::URL is OK' ); } you should be able to view the output of gs.info in the logs