Onload Client Script not working in Agent workspace
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 02:19 AM
I have the below onload Client script and is working perfectly in UI16 however i need the banner to also show in Agent Workspace.
function onLoad() {
var isEvTruck = g_form.getValue('u_ev_truck');
if (isEvTruck === 'true') { // Check if the value is a string 'true'
// Create a banner element
var banner = document.createElement('div');
banner.style.backgroundColor = 'lightgreen';
banner.style.color = 'black'; // You can adjust the text color
banner.style.padding = '10px';
banner.style.fontWeight = 'bold';
banner.style.textAlign = 'center';
banner.innerText = 'This is an EV Truck!';
// Insert the banner at the top of the form
var formHeader = g_form.getFormElement().firstChild;
g_form.getFormElement().insertBefore(banner, formHeader);
}
}
Labels:
- Labels:
-
Agent Workspace
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 12:04 PM
have you found a solution to this? i am also facing the same problem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 09:40 PM
@ran321
Send me the screen shot of the script