Make a Field Mandatory when user clicks on Retire Button for Knowledge Articles in Workspace

21121A3359
Tera Expert

When an ITIL or knowledge user clicks the "Retire" button on a Knowledge Article, the system must display a mandatory justification field with the message "Please provide a justification for retirement", and the article should only be retired after the user enters a valid reason, which must be stored for reference by the Knowledge Manager.

1 REPLY 1

pr8172510
Kilo Sage

Hi @21121A3359,

This requirement can be implemented, but it will require customization because Knowledge Management does not provide an out-of-box retirement justification prompt.

  1. Create a custom field on the Knowledge Article table (for example, u_retirement_justification).
  2. Configure the Workspace Retire action (UI Action / Declarative Action) to open a modal requesting the justification.
  3. Make the justification field mandatory in the modal.
  4. Save the justification to the article record before changing the workflow state to Retired.
  5. Add a server-side validation (Business Rule) to prevent articles from being retired when the justification field is empty.

 Business Rule condition

current.workflow_state.changesTo('retired') && gs.nil(current.u_retirement_justification)

script

current.setAbortAction(true);
gs.addErrorMessage('Please provide a justification for retirement.');


ensures:

  • Users must enter a justification before retirement.
  • The reason is stored on the article for Knowledge Managers.
  • Retirement cannot occur through Workspace, scripts, imports, or APIs without a justification.