Attachments allowed on inactive cases in Portal View

keithlyon
Kilo Contributor

I have received a request to disable the attachment button on the portal after our HR cases go inactive. We have already disabled the ability to comment on inactive cases by modifying the ACL to only allow write functions on active cases. This causes the text field to become unavailable once the case is closed, but the attachment button can be selected, an attachment can be added and it will update the closed case.

Anyone know how to go about hiding or deactivating this button in the HR Service Portal under certain conditions?  

find_real_file.png

4 REPLIES 4

ruzzty06
Tera Expert

This is actually a portal widget and not a catalog item, so I'm in some unfamiliar territory here. More specifically it is the "Ticket Conversations" Widget. Would the client script still apply here?  


User166992
Tera Guru

Hello Keith,



The easiest way to achieve this is using proper ACL's. Setup proper ACL's so that users are not allowed to update anything on HR Cases if the active flag is false. Once, the ACL's are setup; the users will not be able to add attachment or update anything.



Or you can create copy of widget - Ticket Conversations to handle this. Below highlighted line of code called in HTML-



find_real_file.png


This checks the parameter from Server Side code line # 51 and 52 in Helsinki version:


find_real_file.png


Let me know if you any further queries.



Best Regards,


Jaikumar


Hi Jaikumar,

I am quite new to portal development. Could you please help me with the code on how precisely I can modify the canAttach() or canWrite() in the Server Side script to restrict the attachments for Closed/Cancelled cases.

Appreciate your response.

Thanks,

Devika Shukla