- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 08:51 AM - edited 04-23-2025 01:15 AM
Hi All,
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 08:35 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 02:36 PM - edited 04-21-2025 02:38 PM
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');