Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Autopopulate field populating with html code in workbench

Dedeepya Reddy
Tera Expert

hello 

I have tried to autopopulate the cab approver comments in to the cab recommendation field
here's the below code 


(function executeRule(current, previous /*null when async*/ ) {


    var gr = new GlideRecord('change_request');
    gr.get(current.sysapproval);
    gr.addQuery('approval', 'requested');
    gr.cab_recommendation = current.comments.getJournalEntry(1);
    gr.setWorkflow(false);
    gr.update();


})(current, previous);
the above code is working fine in form view but in workbench view it is populating html code 

eg: <p> comment with time</p>

 

0 REPLIES 0