var powerHouse = new GlideRecord('sys_choice'); //Daily check powerHouse.addEncodedQuery('name=core_company^element=u_powerhouse^language=en^sys_created_onONToday@javascript:gs.beginningOfToday()@javascript:gs.endOfToday()'); powerHouse.query(); while(powerHouse.next()){ var mra = new GlideRecord('u_mra'); var gr = new GlideRecord('u_mra_config'); gr.addQuery('install_status','!=', '7'); gr.query(); while(gr.next()){ mra.initialize(); mra.u_software = gr.sys_id; mra.u_powerhouse = powerHouse.value; mra.u_active = false; mra.insert(); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter