Set Assigned to field font color on SCTASK Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 04:52 AM
Any ideas on why this business rule is not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:15 AM
Because a BR runs server side and you are trying to run client side code. Try it as client script (with your conditions):
function onLoad() {
var control = g_form.getElement('assigned_to');
if (control) {
control.style.color = "red";
}
}
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-04-2024 05:18 AM
Ah right and also now that I am thinking about it, since I have added a condition I think I need to place function onCondition() not onLoad
I will try this thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 09:03 AM
Hi, I have copied this script into catalog client script. This script can update the color into requested item (back end) but not getting updated into Service Portal. pls advise.