1. Auto-Create Problem When Incident Reaches Certain Priority Q: How to automatically create a problem record when incident priority is Critical (1)? if (current. priority == 1 && current. state == 2 ) { // In Progress var pr = new GlideRecord ( 'problem' ); pr. initialize (); pr. short_description = current. short_description ; pr. incident = current. sys_id ; pr. insert (); } Steps: After Update BR on incident Condition: priority = 1 and state = In Progress Script: above Tables: incident.priority , problem.incident 2. Link Problem to All Related Incidents Q: How to link multiple incidents to a problem automatically? var gr = new GlideRecord ( 'incident' ); gr. addQuery ( 'category' , current. category ); gr. addQuery ( 'state' , '!=' , 7 ); // Not Closed gr. query (); while (gr. next ()){ gr. problem_id = current. sys_id ; // current = problem gr. update (); } Steps: ...
Comments
Post a Comment