Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Description field value displaying with HTML code in Service Portal

Pavan Dev
Tera Contributor

Incident description field displaying with HTML tags in Portal page. 

Code:

fields = $sp.getFields(gr, 'number,state,priority,sys_created_on,u_description');

Tried getDisplayValue() but no luck. Please find the image.

find_real_file.png

4 REPLIES 4

I tried that but didn't work.

Dan Conroy
ServiceNow Employee

You can try:

<span ng-bind-html="field.short_description.display_value"></span>

Assuming that field.short_description.display_value is where your value "<p>this is test</p> is stored.

That didn't work either. Description field is HTML field.

Code:

This is how I am getting all the fields to display

fields = $sp.getFields(gr, 'number,state,priority,sys_created_on,u_description');