Delete UI action for Problem Table

Priyadharashini
Kilo Contributor

Hi,

I have created a 'Delete' UI Action for the Problem table by using 'Insert and Stay' option from the OOB Delete button which is in Global table. I have a condition that the Delete button should be visible only in the closed state and Resolution code should be "Risk Accepted" and the user should have the Role of "Problem manager".

Condition works fine but the button does not perform any action and remains in the same page. Please provide your suggestions to achieve this.

 

find_real_file.png

1 ACCEPTED SOLUTION

ChanakyaMekala
Kilo Guru

In the script, rather than using the already existed code, use normal delete statement.

 

Simple "current.deleteRecord()" would be enough. And if needed add necessary dialog boxes.

 

Below is an example for such:

 

function deleteClient(){
  if(confirm("Do you want to delete this record?")){
    gsftSubmit(null,g_form.getFormElement(),'deleteRecord');
  }else{
    alert("Record has not been deleted") ;
  }

}


if(typeof window == 'undefined'){
  myServerSideFunction();
}

 

function myServerSideFunction(){
  current.deleteRecord();
}

For this you should

1. Check Client check box. Then in the Onclick field you should mention client function. Here I have mentioned it as deleteClient() function.

2. Action name should be populated with appropriate name. Here I have mentioned it as deleteRecord.

Please mark Answer or Helpful if it had so.

View solution in original post

5 REPLIES 5

Hey 

I have included the above code in my UI action but my delete button has got disappeared on the form.
I will I test it if button is only not visible.
Help me with the same.