Description
Post button disappears when the "Work Notes" field is made mandatory by an UI Policy or Client Script.
Steps to Reproduce
UI Policy example:
1. Create an UI Policy with the following properties:
Table = incident_task
Name = test
Condition = State is Pending
Reverse if false = true
2. Create ui policy action as follow:
Field = Work Notes
Mandatory = true
3. Create test record in incident_task table with state "Work In Progress"
4. Edit the state field of the test record to be "Pending"
> UI Policy will make the Work Notes field mandatory
> See that the Post button disappears
Client Script example:
1. Create an onChange Client Script on the incident table, on the "Category" field.
2. Add the following code in the Script section:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(!g_form.isNewRecord()){
g_form.setMandatory('work_notes', true);
}
}
3. Edit any incident record and change the value of the Category field.
> The Client Script will make the Work Notes field mandatory.
> And the "Post" button disappears.
Workaround
This is expected behavior in New York and Orlando. However, PRB1407767 is now considered an Enhancement Request. Development will make the "Post" button configurable. If configured On then it would appear and users would be able to Post as if it were not mandatory. Currently the Fix Target is Quebec.
Related Problem: PRB1407767