How to hide attachment in CSM/FSM workspace when case state is close or resolved

SomashekarB
Tera Contributor

I have requirement, in CSM/FSM workspace if the case state is moved to closed or resolved, the attachment icon which is visible side bar of the work space should not be visible.

 

Any quick suggestions?

 

SomashekarB_0-1728923279050.png

 

8 REPLIES 8

Hello SomashekarB

I did not use the record default page, that page seems to be outdated when comparing the other more recent available ones, I used the recent CSM Default record page 

DiogoRamos_0-1729064556360.png


If you click on the 3 dots next to the settings button on the record page line, you can create a new variant following the template CSM default record, which will take you to a variant like the one I mentioned on my solution above. (Even if you would use the Standard record one it would be the same)

DiogoRamos_1-1729065335294.png

 

The record default is still using viewports which seems to be the old way of handling this, and on top of that the configure part of the sub-page overview indeed does not provide options at least on my testing, to hide it, so I would go for the solution of using the new record templates. 

Cheers
Diogo

 



Brian Lancaster
Tera Sage

One word of caution about using variants. ServiceNow maid it vary clear in there training that they are constantly making enhancements to these workspaces. If you make a variant and an enhancement comes out that you want to use you have to make a new variant as variants will not get the enhancement. Personally I would go the ACL route to just hide the attachments and not allow more to be added.

I have tried ACL on sys attachment read/write and adding the condition on help desk table as below, but its not working in workspace view.

var gr = new GlideRecord('sn_gsm_helpdesk_cases');
gr.get(current.table_sys_id);
if (gr.state == 'Closed') {
    answer = false;
} else {
    answer = true;
}

Typically the state backend value is a number. Can you check the state and verify what the value is. I don't have CSM but an example would be on Incident the value of state for closed is 7.