Need to change color of Request number field whenever there is a new email received in a HR case

Arka Banerjee
Kilo Guru

Hi All,

 

We have inbound email actions in SNOW for creating HR case. There is notification sent to user after case creation.

 

ArkaBanerjee_0-1749730882592.png

 

Whenever any user replies to the mail notification received after creation of the case, its captured under the comments and work notes section as 'Email Received'. We need to change the color of the request number field to green whenever any reply mail is sent. Is there a way we can achieve this?

 

@Ankur Bawiskar 

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

@Arka Banerjee 

on form you want to show green color?

You will require a custom field on HR Case to identify if inbound email came on that record or not

If it came then set this hidden field

Then use that hidden field to set Field Style on Number field

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

How do we set the hidden field based on a reply mail that came on the case and captured in 'Email Received' section?

@Arka Banerjee 

you can use inbound email action script to set that flag.

But why you wish to clear that flag?

Flag is set means inbound email came

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

JenniferRah
Mega Sage

You will probably need to create a custom flag field to note that an email has been received. Your inbound action can set it, and I guess you would have to have a business rule to un-set it on whatever condition you determine. 

 

Then you can create a Field Style (sys_ui_style) for the Number field. The Style would be "background-color:lightgreen" and the Value would be a javascript condition based on the field you created. It would look something like this: 

javascript:(current.yourfieldname == true)