Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2023 02:29 AM
Hi All,
I want to hide a button called 'Assign' on the portal but it should display as is on the backend view i.e is native view.
Tried the below script (on load client script) but its not working.
setTimeout(function() {
disableButtons();
}, 1000);
function disableButtons() {
if(g_form.getValue('state') == '-15' || g_form.getValue('state') == '-16'){
var btn = this.document.getElementsByClassName("btn btn-default m-r-xs");
for (i = 0; i < btn.length; i++) {
if (btn[i].innerText == 'assign') {
btn[i].style.display = 'None';
}
}
}
}
Can anyone suggest.
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2023 12:07 AM
why not make that UI action as client side and then it will only show in native and not in portal?
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 03:18 AM
you are using wrong syntax for gsftSubmit
Please check docs and correct it
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader