I want to implement a function where you cannot mark any incident or sctask closed state = on hold

Andrew Meza
Tera Expert

Hello,

 

What is the best way to implement:

scTask or Incident cannot be closed if the current state is "On Hold"? 

2 REPLIES 2

jMarshal
Mega Sage
Mega Sage

I'd use an onBefore BR on each table (sc_req_task and incident) which has an if statement looking at the state, abandoning the save action if on hold or pending. This will work if its an automated action trying to close the record, but will allow an end user to try. You can couple this with a condition on the UI Action, which hides it (not available) when on hold/pending so that Agents/Techs/Fulfillers can't try to close it, until it is in an appropriate state.

SanjivMeher
Kilo Patron
Kilo Patron

You would basically need a business rule to abort action, if the current state is closed.

You can use current.setAbortAction(true) to abort the action.


Please mark this response as correct or helpful if it assisted you with your question.