attachments in workspace

VSN
Tera Expert

i have a requirement in configuration workspace to remove attachment icon .

 

VSN_0-1703086163680.png

 

 

20 REPLIES 20

Hi @TramaineM 

There you go! Similar to my above approach, let's change a little bit in the script part like below.

(function checkScreenVisibility(params) {

	if(params.table === 'sn_customerservice_case'){
		return isActive(params.table, params.sysId);
	}
	return true; //default is visible for other tables within Configurable Workspace
	
	//return gs.getProperty("glide.ui.configurable_workspace.show_attachment_bar." + params.table, true) == "true";

})(inputProperties);

/**
 * Validate active record
 */
function isActive(table_name, record_id){
	var gr = new GlideRecord(table_name);
	gr.addQuery('sys_id', record_id);
	gr.addActiveQuery(); //you can change to your own conditions
	gr.query();
	return gr.hasNext();
}

 

The above approach is just to control the visibility of the Attachment within the Contextual Sidebar. I think you're most likely looking for disable attachments when the case get closed, so these options below might be what you're looking for.

Is uploading Attachment disabled? [isAttachmentUploadDisabled]

Option that enables the client script to disable uploading attachments. The option is set in the Form Data Broker.

Is form read only? [isReadOnly]

Option to set the form as read-only.

 

Cheers,

Tai Vu