UI Action onClick not working

MC1
Tera Contributor

I created a UI Action for a custom table to generate a printable version of a form. It works just fine. I tried using the exact same configuration for a UI Action for another table. The only difference is the table name, but this one doesn't do anything at all. From looking in Chrome's developer tools, I see that the printPreview function isn't being recognized.

MC1_0-1689177818277.pngMC1_1-1689177859856.pngMC1_2-1689177876233.png

 

6 REPLIES 6

Sagar Pagar
Tera Patron

Hi @MC1,

 

Make sure you are passing the correct parameter.

Also, is it possible or share the both UI actions scripts.

 

Thanks,

Sagar Pagar

The world works with ServiceNow

MC1
Tera Contributor

The parameter is correct. I printed out the value of rowSysId and it is the right sys_id. The UI Action is exactly the same as the working one, with the only difference being the table name.

Samaksh Wani
Giga Sage
Giga Sage

Hello @MC1 

 

Remove the rowsysid from parameter.

 

you can get sys_id inside the function from

 

var sysid = current.sys_id;

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh

 

 

MC1
Tera Contributor

I tried that but it doesn't work.