We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

html in email script

harry24
Tera Contributor

Hello 

 

How to fetch HTML field value of knowledge article in email script 

 

Thanks

12 REPLIES 12

SN_Learn
Kilo Patron

Hi @harry24 ,

 

Try the below in background script, modify it according to your requirement:

var grKnowledgeBody = new GlideRecord("kb_knowledge");
grKnowledgeBody.get('c85cd2519f77230088aebde8132e70c2');
grKnowledgeBody.info(new GlideSPScriptable().stripHTML(gr.text));

 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

harry24
Tera Contributor

not working

 

Not applicable

@harry24 can you please provide more details or provide screenshots to understand the requirement

Ankur Bawiskar
Tera Patron

@harry24 

you can include that field using this syntax, what didn't work? why to use email script if the field is on same table as that of notification

${fieldName}

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

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