- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2016 11:50 PM
Hi All,
I have created two buttons (UI Actions - Mobile) on a custom table 'Start' and 'Next'. I have a requirement to hide the default 'Save' button and display only one button at a time, first 'Start' during the creation of a new record and 'Next' during the modification of the created record'
I tried below code but no luck
var items = $$('BUTTON').each(function(item){
if(item.id != 'Start' && item.id != ''){
item.hide();
- var items = document.getElementsByTagName('button');
- for(i=0;i<items.length;i++)
- {
- if(items[i].innerHTML.indexOf('Cancel') > -1)
- { // Cancel is the name of the UI action(not element)
- items[i].style.backgroundColor = "#f47121";
- }
- }
I do not want to completely hide the button all the time, so I cannot use ACL.
Is there any hide to hide the button on mobile interface?
Regards,
Srini
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 07:09 AM
You would have to hide the ui action using the condition field on the ui action. You can check current.isNewRecord() and gs.isMobile() in both of your buttons.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 07:09 AM
You would have to hide the ui action using the condition field on the ui action. You can check current.isNewRecord() and gs.isMobile() in both of your buttons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 07:22 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 07:25 AM
You should be able to override it by using the same action name for your custom ui action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 11:53 PM
Thanks Brad, that worked