Problem resolved (advanced)

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 1 minute to read
  • This advanced example demonstrates a table notification that generates an automatic message on Live Feed whenever a problem is closed.

    It also adds a message about the assigned user and posts the message from the assignment group profile instead of the problem record.
    • Table: Problem [problem]
    • Active: Select the check box.
    • Update: Select the check box.
    • Post to Live Feed: Select the check box.
    • Conditions: [Problem State] [is] [Closed/Resolved]
    • Description: Problem Resolved
    • Message:
      Problem ${number} - ${short_description} has been resolved. ${fixedByMsg}
    • Before script:
      //cancel if we didn't just change the problem state if ( !changedFields. contains ( "problem_state" ) )
      answer  = false ;
       
       //if we have an assigned_to value add a comment about who it was //create a new variable fixedByMsg that we can access from the message
      fixedByMsg  = "" ; if ( !current. assigned_to. nil ( ) )
      fixedByMsg  = " Thank you " + current. assigned_to. getDisplayValue ( ) ;
       
       //make the message appear to come from the assignment group if we have one if ( !current. assignment_group. nil ( ) )
      profileSource  = current. assignment_group. getRefRecord ( ) ; //need GlideRecord object
      Figure 1. Example problem resolved message
      Example problem resolved message