Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

bold font in business rule

Deepthi13
Tera Expert

team,

i am tryin bold font to come in business rule by using below script please suggest what i am missing here

(function executeRule(current, previous /*null when async*/) {
var retString = '';
retString += '<p><strong style="font-weight:bold">Please choose whether you are adding a new article or updating an existing article:</strong> ' + current.variables.action_type + "</p>";
retString += '<p><strong style="font-weight:bold">Select article:</strong> ' + current.variables.select_article + '</p>';
retString += '<p><strong style="font-weight:bold">Provide a short description for the knowledge article:</strong>' + current.variables.shortdescription_knowledge +'</p>';
retString += '<p><strong style="font-weight:bold">Please specify the audience of this article:</strong> ' + current.variables.audience + '</p>';
retString += '<p><strong style="font-weight:bold">Please choose the category this article belongs in:</strong> ' + current.variables.category + '</p>';
retString += '<p><strong style="font-weight:bold">Please include any key search terms to help users find your article:</strong> ' + current.variables.key_search + '</p>';
retString += '<p><strong style="font-weight:bold">Article Body - please paste the body of your article below or attach it using the Add Attachments button below:</strong> ' + current.variables.article_body + '</p>';


current.description = retString;

})(current, previous);

output:

find_real_file.png

 

6 REPLIES 6

Anurag Tripathi
Mega Patron
Mega Patron
Why don't you just use tags?
-Anurag

i tried but did not worked, may be i missing some thing could you please help me with syntax

Jaspal Singh
Mega Patron
Mega Patron

Can you try replacing

current.description = retString;

with

current.description = '<strong>'+retString+'</strong>';

Hope business rule is running Before Insert/Update,

Also, I used the script as provided from your (Deepthi )comments & it works well