how to change the color of "Approve" and "Reject" buttons which are present on the Approval Form with onload client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 11:17 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2022 11:33 PM
var img = "/Approve.png";
var response = "approve";
var emailbod = "I approve this request.";
template.print(renderMailtoButton(img, response, emailbod));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 12:09 AM
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