Images in description field

Bosse
Kilo Contributor

Hi,

Im wondering if its possible to have an image visible in the description field for an incident?

When a user sends a ticket by email and has images in the email, the images get uploaded and put as attachments. But I want them showing together with the text in the description field.

The image below shows how it looks like now. I want the images being visible in the description.

Is this possible?

find_real_file.png

5 REPLIES 5

SanjivMeher
Kilo Patron
Kilo Patron

It is only possible, if you have an TML description field.

The way I do it is, I add those details to the comment field in the inbound action.

 

For ex

 

current.comments = "Security Request created by email forwarded by: " + email.origemail + "\n\n" + email.subject + "\n\n[code]" + email.body_html+'[/code]';

 

instead of email.body_text, I use email.body_html and add it inside [code] tag, so that it will display the exact content with images.


Please mark this response as correct or helpful if it assisted you with your question.

SanjivMeher
Kilo Patron
Kilo Patron

Following threat should help

 

https://community.servicenow.com/community?id=community_blog&sys_id=df609af8dbbbdb405ed4a851ca961928


Please mark this response as correct or helpful if it assisted you with your question.

Bosse
Kilo Contributor

Hi,

Thanks for the replies!

This seems to work good in comment fields. But i'm wondering if its possible to have the same result in the description field? Where could I apply the HTML to description?

 

Thanks!

You can't do that with description, because description is a string field.

In one of the projects, what I did was, I created a new field HTML description and displayed it only when it has data. And hidden the actual description field in such cases.

And in the inbound action added script as 

current.u_html_description = email.body_html;

 


Please mark this response as correct or helpful if it assisted you with your question.