How to hide Attachment Paperclip icon in CSM and SOW workspace based on client field value in record

israyalkhan1
Tera Contributor

I have a requirement to Hide Attachment icon in SOW and CSM workspace dynamically based on current record "Client" field value, so how can we achieve this requirement please provide solution.

4 REPLIES 4

HasanM
Kilo Sage

Hi @israyalkhan1 ,

I'd avoid cloning the workspace page or editing the OOB UX Screen condition. Either one creates a customised OOB record that gets skipped at upgrade, and it only hides the icon. Users could still attach through Classic UI, the portal, email or the API.

Instead, control it on the server side:

  1. ACLs on sys_attachment (recommended). Add create and delete ACLs with a script that looks up the parent case and returns false for the restricted Client values. Leave read as it is, so existing files stay viewable. That makes attachments read-only in every channel and is upgrade-safe.

  2. Before insert/delete Business Rule on sys_attachment. Do the same check and call current.setAbortAction(true). It works, but the user only sees an error after trying to upload, so use it only if ACLs aren't an option.

Tip: keep the restricted clients in a system property rather than hard-coding sys_ids.

Hope this helps. Please mark it as helpful if it does.

Hi @HasanM, 
Thanks for you reply, like you suggested by ACL, but it will not hide the Icon from workspace and this I have already implemented by BR like you have mentioned, for restricting upload attachment, but I want to hide that icon tab it self from workspace based on condition how can we do that?

Hi @israyalkhan1,

The attachment panel in CSM/FSM Configurable Workspace is its own UX Screen, called "Attachment". You can control it with a scripted UX Screen Condition based on the case's Client value, without cloning any page variant.

Steps:

  1. Switch your application scope to CSM and FSM Configurable Workspace Foundation.

  2. In the filter navigator, type sys_ux_screen.list. Filter on Screen Name = Attachment and App Configuration = CSM/FSM Configurable Workspace App Config.

    HasanM_0-1795093225444.png

     

  3. Open the Attachment record. Don't use the Screen Condition field on this form. It only supports encoded queries on route fields, so it can't check the case's Client value.

    HasanM_1-1795093242022.png

     

  4. Scroll down to the UX Screen Conditions related list and click New.

    HasanM_2-1795093255006.png

     

  5. On the new UX Screen Condition:

    • Leave Active ticked.
    • Tick Scripted Condition.
    • Untick Cache Result, so the result is worked out for each record rather than reused.
    • Add a script like the one below, replacing u_client with your Client field name. Keep the restricted clients in a system property.
      HasanM_3-1795093272669.png

       

(function showAttachment(params) {
    if (params.table != 'sn_customerservice_case') return true;
    var gr = new GlideRecord(params.table);
    if (!gr.get(params.sysId)) return true;
    var restricted = gs.getProperty('your.restricted.clients.property', '').split(',');
    return restricted.indexOf(gr.getValue('u_client')) == -1;
})(params);
  1. Submit, then test with a case for a restricted client and one for an unrestricted client. Repeat for the equivalent screen in SOW.

Keep your business rule in place, because this only hides the attachment panel in the workspace.

If this helped, please mark it as the accepted solution and click Helpful so others can find it.

Dinesh Chilaka
Mega Sage

@israyalkhan1 ,

Open the table named as UX Screens (sys_ux_screen) .

In that table, open the record with sys_id as 4bd685bc43b47110cc25ff53e9b8f27c.

In that record you can see the field called Screen Condition as follows

Screenshot 2026-11-19 at 6.31.31 PM.png

OOB some conditions present in that Screen Condition field that is 

controller.sowrecordctrl.inputs.inputTable!=sys_template^controller.sowrecordctrl.inputs.inputTable!=sn_occ_custom_alert^controller.sowrecordctrl.inputs.inputTable!=sn_occ_log_viewer_search^controller.sowrecordctrl.inputs.inputTable!=asmt_assessment_instance

just replace that value with the below value

controller.sowrecordctrl.inputs.inputTable!=sys_template^controller.sowrecordctrl.inputs.inputTable!=sn_occ_custom_alert^controller.sowrecordctrl.inputs.inputTable!=sn_occ_log_viewer_search^controller.sowrecordctrl.inputs.inputTable!=asmt_assessment_instance^controller.sowrecordctrl.inputs.inputTable!=sn_customerservice_case^ORcontroller.record.form.fields.u_client.value!=287ee6fea9fe198100ada7950d0b1b73

In my above value replace client field value sys_id your client field sys_id and save the form.
Now observe the difference in the Service Operations Workspace.
If my response helped, mark it as helpful and accept the solution.

 

Thanks,

Dinesh Kumar
Rising Star - 2026