The Zurich release has arrived! Interested in new features and functionalities? Click here for more

how to change the color of "Approve" and "Reject" buttons which are present on the Approval Form with onload client script.

Tejas16
Tera Contributor

On loading of the Approval form, change the colour of the Approve button to "Green" and Reject Button to "Red".

 

I have used getControl() Method but the issue is the buttons which are present on form context menu they are uncolored.

 plz check the attached files.

6 REPLIES 6

sawyan3
Tera Contributor


var img = "/Approve.png";

var response = "approve";

var emailbod = "I approve this request.";

template.print(renderMailtoButton(img, response, emailbod));

sawyan3
Tera Contributor

https://community.servicenow.com/community?id=community_question&sys_id=d2494725db5cdbc01dcaf3231f9619e4

 

Create a UI macro because it only uses CSS and rest of them not and designing  in client script will be difficult due to CSS use.

Also , there is form style on UI Action. But in case you do not want to use it. Above method is best.  

Mark the answer correct if it helps you