- Navigate to System UI > UI Policies
- Create a new UI Policy
Table: Incident [incident]
Active: Selected
Short Description: Lab 3.1 Incident Resolved or Closed
Order: 100
Condition: State | is one of | Resolved + Closed
Global: Selected
On load: Not selected
Reverse if false: Selected
Inherit: Not Selected
- Save the record, remain on the form
- Add UI Policy Action ->
- Scroll down to the UI Policy Actions Related List and select the New button
- Configure the UI Policy Action:
Field name: Urgency
Mandatory: Leave alone
Visible: Leave alone
Read Only: True
- Select Submit
- Examine the record you just created in the list of UI Policy Actions. Notice the red dot to the left of urgency? This indicates there is an error that requires attention. Select the urgency link to open the record
- An error message appears indicating there are multiple UI Policies with the same Order for this field. Select the Make fields read-only on close link in the error message to open the conflicting UI Policy record
- If the Default view of the form opens, select the Advanced view Related Link to display the Order field. Record the Order of the Make fields read-only on close UI Policy
- Return to the Lab 3.1 Incident State Resolved UI Policy. If the Default view of the form opens, select the Advanced view Related Link
- Change the Order field value to value greater than the conflicting UI Policy Order field's value
- Save the record, remain on the form
- Notice the red dot to the left of the urgency UI Policy Action is no longer visible
- Add two additional UI Policy Actions ->
Impact: Read only
Closed by: Mandatory
- Select (check) the Run scripts field on the Script tab
- Examine and write the Execute if true script:
function onCondition(){
if(g_form.getValue('close_code')=='' || g_form.getValue('close_notes')=='' || g_form.getValue('resolved_by')==''){
g_form.addInfoMessage("REMINDER: Populate the Resolution Information fields before saving and Incident in a Resolved or Closed State");
}
}
- Select Update