UI Action/form context to have warning message?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2023 12:24 AM
Hello,
I am trying to add a warning message to the "Delete Asset Only" context menu option. If "ok" is selected, then the action proceeds. If not, then the action is aborted.
Here is my script, it is currently deleting the asset without showing a pop-up message:
function confirmAssetDeletion(){
var answer = confirm("Are you sure you want to delete this asset?")
if(answer == true){
gsftSubmit(null, g_form.getFormElement(), 'delete_asset_only'); //MUST call the action name set in this UI Action
} else {
return false;
}
}
if(typeof window == 'undefined')
deleteAssetAction();
function deleteAssetAction(){
var a = new AssetandCI();
a.deleteAssetOnly(current);
}
Which part of the script is incorrect?
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2023 12:35 AM
Is client selected in the UI Action?
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.