Onclick of the UI Action i am trying to delete a record

vyshnavi8
Tera Expert

Onclick of my UI Action i am trying to delete that record its deleting but its showing an error message as below,

Illegal attempt to access class 'com.glide.script.GlideController' via script

Below is my UI Action code,

current.setWorkflow(false);

current.deleteRecord();

Can anyone help me on how i am getting this error message????

5 REPLIES 5

Chuck Tomasi
Tera Patron

Can you include a screenshot of the entire UI action? I suspect there may be other details (like Client is checked) that we are missing.


vyshnavi8
Tera Expert

sh.png


Thanks. I did a really really simple version of this and had no issues. Mine had no condition, just the two statements you had and it worked.



Try these:


  • Test #1: remove the condition and see if it works (copy it to the comments field so you don't lose it entirely.)
  • Test #2: Add these to the condition: && current.isValidRecord() && current.canDelete()

it got worked...


Thank u