Display the Ui action button based on the condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 12:54 AM
if the type if Desktop or Printer then add a button on top of task "TO"
when clicked on TO it initiates the transfer order process.
Please correct the above below script.
if (current.type == 'desktop' || current.type == 'printer') {
action.setVisible(true); // Show the button
} else {
action.setVisible(false); // Hide the button
}
var url = "https://dev.service-now.com/now/nav/ui/classic/params/target/sn_hamp_loaner_asset_order_list.do?sysp...";
action.setRedirectURL(url);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 12:57 AM - edited 11-04-2024 12:58 AM
Put this current.type == 'desktop' || current.type == 'printer' in condition section instead of script section
In script section, use only redirect URL
var url = "https://dev.service-now.com/now/nav/ui/classic/params/target/sn_hamp_loaner_asset_order_list.do?sysp...";
action.setRedirectURL(url);
