Please help with hide a UI Action scripting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 09:48 AM
Hello,
I created a copy incident button and would like it to hide after it's clicked on. is that possible? Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 11:46 AM
Firstly we need to know whether we copied the record or not for that either you can relationship between copied and Original record and based on that you can hide the UI action.
The other way is having a Checkbox on the record and once the Record is copied we can mark that checkbox as true and based on this checkbox(if Checkbox is false) you can show and if its true you can hide the UI Action.
Please Mark my answer as correct if it helps.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 12:30 PM
Yes @Annie10 its possible !!!
just follow some steps...
step 1 : Open any incident record
step 2: right click
configure>UI action
Step 3 : Choose you button name
Step 5 : Write your logic inside the script section
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2024 12:47 PM
Hi @ajay98
I am still learning JavaScript and I need some guidance from you or the community on how I would code this.
This is a custom button. I would like the button to hide once the user clicked on close button on the popup message. Thank you
function hideButton() {
var dd = new GlideModal('Confirm');
dd.setTitle('Comfirmation');
dd.renderWithContent('<div>The duplication of this incident has been sucessfully completed. <div style="text-align: right;"><button onclick="cancel()">Close</button></div>');
function confirm() {
gsftSubmit(null, g_form.getFormElement(), 'continue_scoping');
}
function cancel() {
dd.desctroy();
}
}