Current Request sys_id on ui action

Vaishali 11
Tera Guru

How to get the sys_id of a current request in an ui action which is running on the task table?

 

 

 

Thanks,

Vaishali

16 REPLIES 16

Ok, no problem. Any suggestions on how that can be done?

@Vaishali 11 

g_form.getUniqueValue() is the right command to be used to get the sys_id of the record in question. I created a simple UI action on the incident table to just capture the sys_id and show it on the screen.

 

SebastianDL_0-1671547100007.png

 

And this is how it looks when you pressed it.

SebastianDL_1-1671547206049.png

 

What is not working for you?


If I helped you with your case, please click the Thumb Icon and mark as Correct.


Vaishali11_0-1671547528851.png

This is the ui action script which I created on the task table to show details entered on the ordered form. I have changed line number 8 to- gm.setPreference('req_id', '8016a37a1b3f915cbde35467624bcb9d');

it's working for the particular request, but am not able to make it dynamic.

 

@Vaishali 11 

I am not sure if this will help but try it.

Put .toString() at the end like this.

 

SebastianDL_0-1671548196792.png

 


If I helped you with your case, please click the Thumb Icon and mark as Correct.


Hi Sebastian,

this is the ui action which I created:-

Vaishali11_0-1671548378036.png

and the script is as below:-

Vaishali11_1-1671548405035.png

when i made the change at line number 8, hardcoding the sys_id of a particular request as mentioned above it's working for a particular request, but I want to make it dynamic.