html in email script

harry24
Tera Contributor

Hello 

 

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

 

Thanks

12 REPLIES 12

Viraj Hudlikar
Tera Sage

@harry24 - The requirement is incomplete to me after fetching what are you trying to do with it are you going to print in email body?
If yes the simple gliderecord on article then once you get row record then with template.print(GlideRecordobject.fieldname); will print value in email body.

If no then please let us know little more with your use so we can guide you.

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

Hello @harry24

 

I believe you are doing great.

Did my reply answer your question?

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

 

Thanks & Regards,
Viraj Hudlikar.

Community Alums
Not applicable

Hi @harry24 ,

Can you try out following code in Email script.

 

var article = new GlideRecord('kb_knowledge'); 

var articleSysId = current.sys_id; 

if (article.get(articleSysId)) {
var htmlContent = article.Field_name; 

email.body = "Knowledge Article contents: " + htmlContent;