attachments in workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2023 07:29 AM
i have a requirement in configuration workspace to remove attachment icon .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 08:36 AM
Hi Timi
I have tried creating a new system property it did not work out and i have called it in snc_attachments for service operation workspace ux attachment and can you help me in how to condition it with my requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 08:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2024 09:09 PM
You're pretty closed to it. The Attachment screen in the Change recorc is little different.
You can try this way to control the visibility of the attachment in the change task record in service operation workspace.
1. Make sure you're creating the condition for the screen below
URL: https://<instance_name>.service-now.com/sys_ux_screen.do?sys_id=4bd685bc43b47110cc25ff53e9b8f27c
2. New screen condition
Sample Script
(function checkScreenVisibility(params) {
if(params.data.table === 'change_task'){
if(gs.hasRole('admin')){
return true;
}
return !isChangeClosed(params.data.table, params.data.sysId);
}
return true;
})(inputProperties);
/**
* Validate change request has been closed
*/
function isChangeClosed(table_name, record_id){
var gr = new GlideRecord(table_name);
gr.addQuery('sys_id', record_id);
gr.addQuery('change_request.state', 3);
gr.setLimit(1);
gr.query();
return gr.hasNext();
}
Scripted Condition: True
Parameter Mapping:
{
"type": "MAP_CONTAINER",
"container": {
"table": {
"type": "DATA_OUTPUT_BINDING",
"binding": {
"address": [
"sowrecordctrl",
"table"
]
}
},
"sysId": {
"type": "DATA_OUTPUT_BINDING",
"binding": {
"address": [
"sowrecordctrl",
"sysId"
]
}
}
}
}
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2024 11:00 PM
Hi @Tai Vu
i have tried with above script in ux screen but did not work, in script i see calling input properties, so do i have to create a system property, if yes can you help me in how to create one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2024 08:40 PM
Everything is working perfectly on my end. Could you please review the following points and share some screenshots of your progress?
- The UX Screen where you created the condition.
- Verification that the Scripted Condition is checked.
- Confirmation that the Parameter Mapping is filled in.
Cheers,
Tai Vu