Banner call button icon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 10:36 PM
where is the configuration of call button which is present on banner of servicenow ? Can we hide it depending on the workspace ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 10:51 PM
this is not what i need
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 11:02 PM
If you have different workspaces and you want to hide the button based on the workspace, you can use a script like this:
(function() {
var workspace = g_scratchpad.workspace || ''; // Assume g_scratchpad.workspace holds the current workspace value
return workspace !== 'desired_workspace'; // Replace 'desired_workspace' with the workspace where you want to show the button
})();
If the condition cannot be managed directly in the UI Action, you might need to use a Client Script.
function onLoad() {
var workspace = g_scratchpad.workspace || ''; // Assume g_scratchpad.workspace holds the current workspace value
if (workspace !== 'desired_workspace') { // Replace 'desired_workspace' with the workspace where you want to show the button
var callButton = g_form.getControl('call_button_name'); // Replace 'call_button_name' with the actual button name or ID
if (callButton) {
callButton.style.display = 'none';
}
}
}
Thank you, please make helpful if you accept the solution.