Skip to main content

Posts

Showing posts from August, 2020

Dynamic hide/show of catalog item variables

 Based on onchange client script on field of type 'numeric scale' function onChange ( control , oldValue , newValue , isLoading ) { /*if (isLoading || newValue == '') { return; }*/ for ( var ic = 2 ; ic < 6 ; ic ++){ var bDispl =( newValue >= ic ); if (! bDispl ){ g_form . setValue ( 'field_' + ic , '' ); g_form . setValue ( 'field2_' + ic , '' ); g_form . setValue ( 'field3_' + ic , '' ); } g_form . setMandatory ( 'field_' + ic , bDispl ); g_form . setMandatory ( 'field2_' + ic , bDispl ); g_form . setMandatory ( 'field3_' + ic , bDispl ); g_form . setDisplay ( 'field_' + ic , bDispl ); g_form . setDisplay ( 'field2_' + ic , bDispl ); g_form . setDisplay ( 'field3_' + ic , bDispl );

Check if in Service Portal or Classic UI, and display message (catalog client script)

  if (typeof spModal != 'undefined') {                      // Portal                      spModal.alert(sAlertMessage);                 }                 else {                      // Desktop UI                      var gm = new GlideModal();                      gm.setTitle("Warning");                      gm.renderWithContent(sAlertMessage);                 } see this catalog client script example: function onLoad () { //Type appropriate comment here, and begin script below var sMsg = 'test the display message' ; if ( typeof spModal != 'undefined' ) { // Portal spModal . alert ( sMsg ); } else { // Desktop UI var gm = new GlideModal (); gm . setTitle ( "Warning" ); gm . renderWithContent ( sMsg ); } }

ServiceNow Dynamically update the image of a catalog item

ServiceNow Dynamically update the image of a catalog item  see https://community.servicenow.com/community?id=community_question&sys_id=a7fa73aedb6feb409a64e15b8a9619a7 https://community.servicenow.com/community?id=community_question&sys_id=6dcf0f65dbdcdbc01dcaf3231f961989 https://community.servicenow.com/community?id=community_question&sys_id=8f26ec0bdb3fa34414d6fb24399619f5

Dynamically update the price on a catalog item

use the dropdown options to drive price: https://community.servicenow.com/community?id=community_question&sys_id=290f042fdbd1441423f4a345ca96196f also see: https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-management/concept/c_ServiceCatalogVariablePricing.html https://docs.servicenow.com/bundle/orlando-it-service-management/page/product/service-catalog-management/task/t_ExtendThePricingModel.html https://community.servicenow.com/community?id=community_question&sys_id=33fa9f8fdb7533042be0a851ca96194e

Set up a bunch of test users

 via fix script Users – 10 in total NAME USER ID test USER1 test_user1 test USER2 test_user2 test USER3 test_user3 test USER4 test_user4 test USER5 test_user5 test USER6 test_user6 test USER7 test_user7 test USER8 test_user8 test USER9 test_user9 test USER10 test_user10 Groups – 2 in total   TestGrp1 TestGrp2   Group memberships All above users added to each group   Group roles – 2 in total itil agent_workspace_user   Stand alone user roles – 1 in