Need to highlight HR cases created from certain emails via inbound action

Arka Banerjee
Kilo Guru

Hi All,

 

ArkaBanerjee_0-1745250194321.png

 

Above is a screenshot of a HR case created from an Inbound email action.

 

I need to display an error message at the top, above the info message that you see in the screenshot, whenever the sender's email domain(i.e. the person who sent the email via which the case got created in SNOW) isn't among the whitelisted ones(@abc.com ,  @xyz.com for egs), mentioning something like 'This email isn't from a trusted domain. Kindly proceed with caution.'

 

Can someone please help me achieve this. Thanks!

 

@Ankur Bawiskar 

1 ACCEPTED SOLUTION

Hi Ankur,

 

I have created a custom field for the form, populated the sender email from the inbound action by setting the field's current value with email.origemail, and then used your script, it worked as expected.

View solution in original post

10 REPLIES 10

jcmings
Mega Sage

Have you tried setting up an onLoad client script to read the current value of the Email Origination field?

 

If you're OK with just an icon, you can use the g_form.addDecoration function like this:

g_form.addDecoration('email_origination', 'icon-alert', 'Hover over text here', 'color-red');

If not, you may need to do some research on setting the background color via client script. Some other Community posts suggest doing something like this: 

function onLoad() {
    var a = g_form.getControl('email_origination');
    a.style = "background-color:red";
}

 

To display the info message at the top, you'd have a line like this:

g_form.addInfoMessage('Info message contents here');