UI Action/form context to have warning message?

Adrienne Kueber
Tera Contributor

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.

AdrienneKueber_1-1697008930599.png

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

Peter Bodelier
Giga Sage

Hi @Adrienne Kueber 

 

Is client selected in the UI Action?


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.