Post Button not visible for Worknotes on HR Case/Task

Akhila8
Mega Expert

Post Button is not visible on my Work notes and Additional comments when the state is changed to "RESOLVED" on my HR Case and HR Task after Upgrade to NewYork.

 

Can anyone help me where to check and all?

Any help is appreciated!!

Thanks,

Akhila.

1 ACCEPTED SOLUTION

Akhila8
Mega Expert

In NewYork, the Post button is disabled if work notes are made Mandatory, raised HI Ticket and got to know this. Thanks for all replies.

View solution in original post

9 REPLIES 9

Cuong Phan
Kilo Sage

Hi Akhila,

 

It could be a permission issue. Please look at a write ACL on this table for the .comments

 

Cheers,

David.

Regards,
Cuong Phan
ServiceNow Technical Lead

 

 

Checked All ACL, they are fine. This is happening only when state is changed to resolved. There is a client script when state is resolved and making work notes mandatory. If I remove this mandatory condition. Then it works(Post Button is visible), but I have to have Work notes mandatory as well.

I have created UI Policy then to make work notes mandatory - Failed.

Unable to achieve, both mandatory and POST button visibility.

 

Unsure whether I am in direction or falling apart but trying in this way.

https://hi.service-now.com/kb_view.do?sysparm_article=KB0634703. This KA states when Activity formatter is not present but Activity Formatter is present and Work notes, comments are also configured in Activity Formatter.

 

Any Suggestions would help!!

 

On Change Client Script written on HR Case - State Field
 
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (g_form.isLiveUpdating())
        return;
    if (isLoading || newValue == '')
        return;
    g_form.setDisplay('comments', true);
    g_form.setMandatory('work_notes', false);
    g_form.hideFieldMsg('work_notes');
    if (newValue == 20) { // resolved
        if (g_form.getValue('work_notes') == '') {
            // Remove any existing field message, set comments mandatory, and show a new field message
            try {
                g_form.hideFieldMsg('work_notes');
            } catch (e) {}
            g_form.showFieldMsg('work_notes', getMessage('Please enter a comment when changing case state to Resolved'), 'error');
            g_form.setMandatory('work_notes', true);
//When I removed above Mandatory then Post button is Visibile but Worknotes is no longer mandatory
            g_form.setDisplay('comments', false);
            return false; // Abort submission
        }
 
Kindly correct if I miss Something.
 
This is only Happening in NewYork, This is working good in Madrid.

Ashok Antony1
Kilo Expert

Resolved is not a default OOTB case state. Is this a custom state that you have created? Work Notes is a system field and it is ON by default but not mandatory. If you just want to make the HR Agent enter a Work Note before resolving a HR Case, just create a UI policy making Work Notes as mandatory when state changes to Resolved. You can deactivate the CS, create this UI policy and check. It should work