
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2017 01:20 AM
Hello All,
I am trying to hide 'Save' & 'Submit' button for a custom application by using below client script (onLoad) , but doesn't seem to be working. Can anybody direct me to my mistake?
function onLoad() {
var items = $$('BUTTON').each(function(item){
if(item.innerHTML.indexOf('Submit') > -1){
item.hide();
}
});
}
I even tried to create an UI action with same action name (OOTB-Save & Submit) as that of what I want to hide and added a false condition to that new UI action, without luck.
Also, attempted to Exclude the visibility of Save UI Action for my custom application on sys_ui_action_view.
Any update will be welcomed.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2017 01:13 AM
Hello Hussain,
Create a new record on sys_ui_action_view table with below field value.
UI Action Visiblity- select the UI Action which you want to hide. In your case select 'Save' or 'Submit' UI Action created on global application.
View - Select the view of the form on which you want to hide the UI Action.
Application Global
Visibility : select Exclude from the Menu
Above entry will be populated in 'UI Action Visibility' related list of your UI Action.
Hit Like or Correct on the impact of response.
-Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2017 03:22 AM
Hi Hussain,
if you are using scoped app then this won't work since it doesn't allow DOM manipulation inside scripts.
Also can you check whether it is going inside the if condition by adding alert statement.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2017 03:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2017 01:13 AM
Hello Hussain,
Create a new record on sys_ui_action_view table with below field value.
UI Action Visiblity- select the UI Action which you want to hide. In your case select 'Save' or 'Submit' UI Action created on global application.
View - Select the view of the form on which you want to hide the UI Action.
Application Global
Visibility : select Exclude from the Menu
Above entry will be populated in 'UI Action Visibility' related list of your UI Action.
Hit Like or Correct on the impact of response.
-Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 03:53 AM
can we disable the submit button if the mandatory fields are not filled...if we fill the mandatory fields the submit button has to show ...we to do this by using client scripts how can we do this