- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2019 09:38 AM
Hi All,
I am working on one UI action to display a pop-up message in the list view and is not working. I am getting a pop-up message, but when we select a record and try to delete, the record is not getting deleted. Anyone can you please help me with this? Is this requirement feasible? because in list view current.deleteRecord() won't work as it is referring to current object and it works only in the form or single record and it won't apply for a multiple record. Can anyone please suggest any approach or ideas.
Regards,
Chaithra
This is the script I have written and is working in form view but not in list view:
function showAlert(){
if(confirm("Are you sure you want delete this record?"))
{
gsftSubmit(null,g_form.getFormElement(),'Test');
}
else
{
return false;
}
}
if(typeof window == 'undefined'){
myServerSideFunction();
}
//server-side function to delete the current record
function myServerSideFunction(){
current.deleteRecord();
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2019 11:34 AM
Yeah. Since they work differently and getting the sys_ids (one or more in a list) while on the form its a single sys_id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2019 07:44 AM
Hi Ankur,
Exactly the same requirement. But they have different domains in their instance for different customers, so there was an ask to create a custom 'Delete' UI Action in one of the domains to give delete access to certain users with a certain role. I will check out the script and try whether I can use similar code in custom UI Actions. Thank you so much.
Regards,
Chaithra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2019 10:06 AM
Hi MB/Ankur,
Thank you for your inputs. I did insert and stay of the OOB UI Action in the TOP domain. Now, I am trying to modify that OOB List UI Action to have it working in form view too. Is it feasible to include UI Actions in both List and Form view? I am trying, but it is called from DeleteRecordAjax Script Include and is it recommended to change OOB UI Action code? Or you suggest to have two UI Actions in that domain for both List and Form view? Too many UI actions might reduce the performance right. Any insights please?
Regards,
Chaithra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2019 10:06 AM
Hi MB/Ankur,
Thank you for your inputs. I did insert and stay of the OOB UI Action in the TOP domain. Now, I am trying to modify that OOB List UI Action to have it working in form view too. Is it feasible to include UI Actions in both List and Form view? I am trying, but it is called from DeleteRecordAjax Script Include and is it recommended to change OOB UI Action code? Or you suggest to have two UI Actions in that domain for both List and Form view? Too many UI actions might reduce the performance right. Any insights please?
Regards,
Chaithra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2019 10:14 AM
You can check the box for Form button and it will put it on both form and list. I wouldn't touch any of the out of box code. It should do everything you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2019 10:23 AM
Hi MB,
I tried doing that and I can see the form button but it is not working when I click on it.