Skip to main content

Posts

Showing posts from February, 2023

ServiceNow using GlideRecord within a GlideAggregate to access an additional column value

 ServiceNow using GlideRecord within a GlideAggregate to access an additional column value (I wonder if there might be a smarter way of doing this?) var sQuery = 'status=1^profile!=NULL' ; //--status=active var sTable = 'x_cls_clear_skye_i_account' ; var sField = 'profile' ; var sField2 = 'name' ; var iCountValue = 1 ; var dupls = checkDupl ( sQuery , sField , sField2 , sTable , iCountValue ); gs . print ( dupls ); function checkDupl ( customQuery , fieldParam , fieldParam2 , table , iCountValue ){ var ga = new GlideAggregate ( table ); ga . addAggregate ( 'COUNT' , fieldParam ); ga . orderByAggregate ( 'count' , fieldParam ); ga . orderBy ( fieldParam ); if ( customQuery ){ ga . addQuery ( customQuery ); } ga . addHaving ( 'COUNT' , '>' , iCountValue ); ga . query (); var dupls =[]; dupls . push ( "The following " + ga . getRowCount () + " records

ServiceNow use 'getDisplayValue' in GlideAggregate

ServiceNow use 'getDisplayValue' in GlideAggregate var sQuery = 'status=1^profile!=NULL' ; //--status=active var sTable = 'x_cls_clear_skye_i_account' ; var sField = 'profile' ; var iCountValue = 1 ; var dupls = checkDupl ( sQuery , sField , sTable , iCountValue ); gs . print ( dupls ); function checkDupl ( customQuery , fieldParam , table , iCountValue ){ var ga = new GlideAggregate ( table ); ga . addAggregate ( 'COUNT' , fieldParam ); ga . orderByAggregate ( 'count' , fieldParam ); ga . orderBy ( fieldParam ); if ( customQuery ){ ga . addQuery ( customQuery ); } ga . addHaving ( 'COUNT' , '>' , iCountValue ); ga . query (); var dupls =[]; dupls . push ( "The following " + ga . getRowCount () + " records have matching on " + fieldParam + ": " ); while ( ga . next ()) { var DuplLine = ga . getAggregate ( 'COUNT'

Using a MACBOOK - basic commands

 After a pause of around 10 years, I am now using a MAC again!! If like me you initially find using a mac a bit perplexing, below are some functions I found helpful mission control all open windows: scroll up on touchpad with 3-4 fingers Ctrl-up arrow : all open windows Ctrl-up arrow : all open windows of same type (e.g. word documents) shift-command-4   take a screenshot shift-command-3 (FYI if you are using snagit and experiencing difficulties pulling a screenshot into word, you can save the snagit file as a photo using dropdown arrow in the top right next to 'share link' and then pull it into word from insert photo) command B / command Z / command S - set font to bold / undo last action / save - similar to ctrl- on windows control-down arrow  when clicked when you have file explorer open for example, shows how many similar windows you have open enabling you to close them shift-enter carriage return note for carriage return in excel use option-enter option-command-M minimis

ServiceNow moving your certs from one partner to another

 I've found this can be a bit of a pain to do! if at any stage you get stuck, you. an raise a support case via the ServiceNow training site here example of how they helped me: Thank you for contacting the Now Learning team. Your accounts have been merged. NowLearning account ryyy.yyy@yyyyy.co.uk has been de-activated and all the learning history has been transferred to NowLearning account ryyy.yyy@yyyyy.com. Webassessor account's ID has also been linked to this nowlearning account ryyy.yyy@yyyyy.com Happy Learning ahead! I am moving this ticket to resolved state. Your ticket will be resolved but remains open for the next five calendar days in case you are still experiencing an issue. Please respond to this case within the next five calendar days if we can be of further assistance. Moving the certs yourself Basically, in order to move the cert you can do this from the partner portal profile as per the following ServiceNow video  https://partnerportal.service-now.com/kb?sys_kb_i

SERVICENOW list of clients and partners I've worked for

 see my linkedIn PARTNERS/VENDORS Clear Skye (current) - they are awesome Methods Virtual Clarity (now DXC ) HCL Focus Group Europe (now Accenture ) Mozaic (I have also worked alongside ServiceNow, Dynatrace, HP, Wipro and TCS amongst others) CLIENTS/CUSTOMERS Helped out with ServiceNow with the following companies: Government Legal Department (UK Government) Homes England (UK Government) HMCTS (UK Government) Ministry of Justice (UK Government) Pearson UBS Deutsche Bank Credit Suisse London Stock Exchange Mitchells and Butlers Gatwick Airport National Grid (UK) Nokia (UK and Finland) PNC Bank (UK and USA) RWE (N-Power) Standard Life Learn Direct Severn Trent Water (in my previous life prior to ServiceNow I worked for Dept of Educaion (UK Gov) for 1.5 years, and Santander Bank for 11 years)

SERVICENOW BEST PRACTICE - detailed post

note- check latest version docs links as applicable or as per your instance version  see also the video version   Health scan example items Do not use current. update() in business rules https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0715782 Do not update related tables in a before business rule https://developer.servicenow.com/dev.do#!/guides/tokyo/now-platform/tpb-guide/business_rules_technical_best_practices use of getRowCount() in GlideRecord https://developer.servicenow.com/blog.do?p=/post/training-glideagg/ Do not use hard coded sys ids in scripts https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0785129 never use current.update() in a workflow https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0680098 client side code should not use GlideRecord https://www.servicenow.com/community/developer-forum/why-it-is-not-good-to-use-gliderecord-in-clientscript/m-p/2023789 Client scripts should not use the ev