Skip to main content

Posts

ServiceNow Scripts and Engines Execution Order

 ServiceNow Scripts and Engines Execution Order Helpful article when troubleshooting Stage change issues:  Scripts and engines execution order docs.servicenow.com Scripts and engines execution order Scripts, assignment rules, business rules, workflows, escalations, and engines all take effect in relation to a database operation, such as insert or update. In many cases, the order of these events is important.

ServiceNow RECORD PRODUCER VARIABLES

ServiceNow RECORD PRODUCER VARIABLES  OPTION 1: var allVars = []; var sys_id = '14d3ca4b1b2ebd50af03dce0b24bcbfc' ; var producerVars_allVars = new GlideRecord ( 'question_answer' ); producerVars_allVars . addQuery ( 'table_sys_id' , sys_id ); producerVars_allVars . addQuery ( 'question.type' , '!=' , 11 ); producerVars_allVars . addQuery ( 'question.type' , '!=' , 19 ); producerVars_allVars . addQuery ( 'question.type' , '!=' , 20 ); producerVars_allVars . query (); while ( producerVars_allVars . next ()) { var varName = producerVars_allVars . question . name . toString (); if (! gs . nil ( varName )) { //if (varName == 'business_role_iga') { var sVar =( 'VARIABLE NAME: ' + producerVars_allVars . question . name . toString () + ' \nVARIABLE VALUE=' + ...

ServiceNow Get Variable Name in Business Rule (Record Producer or Service Request)

 ServiceNow Get Variable Name in Business Rule (Record Producer or Service Request) current.variables.<variable_name>  for a record producer where you don't know the variable names this type of approach could work: var allVars = []; var producerVars_allVars = new GlideRecord ( 'question_answer' ); producerVars_allVars.addQuery( 'table_sys_id' , '6212096e477782504410edf1d16d43ea' ); producerVars_allVars.addQuery( 'question.type' , '!=' , 11 ); producerVars_allVars.addQuery( 'question.type' , '!=' , 19 ); producerVars_allVars.addQuery( 'question.type' , '!=' , 20 ); producerVars_allVars.query(); while (producerVars_allVars.next()) { var varName = producerVars_allVars.question.name.toString(); var varValue = producerVars_allVars.value.toString(); if (!gs.nil(varName) && !gs.nil(varValue) ) { allVars.push(varName + ';' + varValue); gs.info( 'VARIABLE NAM...

ServiceNow Submit Button was not appearing on portal catalog item

 ServiceNow Submit Button was not appearing on portal catalog item I found this post useful: https://www.servicenow.com/community/developer-forum/no-submit-button-in-catalog-item-view/m-p/1823356 steps: 1) Go to Maintain Items i,e the Catalog Item Table for your particular Catalog Item 2) Please pull these columns from the personalized gear  No Cart, No Order, No order Now, No Proceed to checkout 3) Make sure all these are False. Check if this resolves your problem.

ServiceNow use Google Chrome Extension to show instance environment

 ServiceNow use Google Chrome Extension to show instance environment environment marker extension see  https://chrome.google.com/webstore/detail/environment-marker/ahjhdebcnlgmojdmjnhikhakkghcchkk