How do i make Work notes by default on case form

sush_s
Kilo Explorer

Hi All - I have a requirement to make work notes as by default all the time in the case form. so, I have written below client script to make it default but it's not working in some scenarios.  

Type - Onload, table - sn_hr_core_case

function onLoad() {
setPreference('glide.ui.sn_hr_core_case_workforce_admin.stream_input', 'work_notes');
setPreference('glide.ui.activity_stream.multiple_inputs', 'false');
}

Issue is when the user select "additional comments" checkbox and reloads the case form without saving or posting the work notes the work notes is not displayed . When the second time the form is reloaded then the work note gets Displayed. Our requirement is Even after selecting "additional comments" and refreshing the form 1st time case form should defualt to worknotes. TIA

Thanks,

Sushma

 

2 REPLIES 2

Susan Britt
Mega Sage
Mega Sage

Did you get a resolution to this?  Seems like it should work, as long as you have the Client Script defined on the sn_hr_core_case table and the "Inherited" field is set to true.  The "setPreference('glide.ui.sn_hr_core_case_workforce_admin.stream_input', 'work_notes')" would need to be on each COE table that you use though (i.e. sn_hr_le_case, sn_hr_core_case_payroll).  

 

RodGallegos
Tera Guru

@sush.s  I did this in my instance as well and getting the same behavior you are. @sbritt As you pointed out, the preference needs to be set on each COE. So in my client script, I pointed it to the sn_hr_core_case table, and then I included all COE tables. It is almost as though there is a lag/delay in the client script running. Any further developments here or should we chalk this up as a minor thing and move on?