- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 03:13 PM
Hi,
We have this requirement where an HR Case number field BG color must turn light blue whenever a worknote or comment is added to the case.
I tried creating an onChange client script but it didn't work:
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
// Get the HR number field
var hrNumberField = g_form.getControl('number');
if (hrNumberField) {
hrNumberField.style.backgroundColor = 'lightblue';
}
}
Am I missing something here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 09:55 AM
You need to do two script 1) additional comments 2) Work notes. Please check below example I did on incident. it worked fine for me on Incident.
Please mark my answer correct and helpful if this works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 03:55 PM
try like below. Please mark my answer correct and helpful if this works for you.
var control = g_form.getControl('number');
control.style.backgroundColor = "lightblue";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 07:55 AM
Hi @Gangadhar Ravi, I tried this but unfortunately, still didn't work. This is some of the configurations I did:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 09:55 AM
You need to do two script 1) additional comments 2) Work notes. Please check below example I did on incident. it worked fine for me on Incident.
Please mark my answer correct and helpful if this works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2024 09:04 PM
Hey @gangadhar, appreciate the fast response. On the instance I'm working on, it's still doesn't work BUT on my PDI, it does work with Incident table. I might have to escalate this to support. Thanks for the help!