- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2017 03:58 AM
ServiceNow dynamically changes the label for the additional comments field to contain the text 'customer visible'. I created something similar for work notes, but what about UI Actions? Can we dynamically modify it's text form an onchange client script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2017 06:49 AM
I am not proud of what I did, but I solved it by using the following code
var action_name = '<action name of the UI Action';
var label = '<some label>';
var selector = 'button#' + action_name;
$j(selector).each(function(){
$j(this).html(label);
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2017 04:04 AM
Hey Peter,
I doubt you can do that and ofcourse set label can be done on the field level. But in order meet your requirement you can create another button and set the conditions accordingly for the visibility.
Let me know if you need any help there
post me your feedback, boosts me further to help more
Please Hit ✅Correct, â�ï¸�Helpful, or â�£ï¸�Like depending on the impact of the response
Have a lovely day ahead
Regards,
Divya Mishra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2017 06:49 AM
I am not proud of what I did, but I solved it by using the following code
var action_name = '<action name of the UI Action';
var label = '<some label>';
var selector = 'button#' + action_name;
$j(selector).each(function(){
$j(this).html(label);
});

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2017 06:50 AM
You can do GlideAjax from your client script.
In you GlideAjax script include, you can do GR to sys_ui_action table and update UI action name.
REgards,
Sachin