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

@Vaishali 11 

In my last suggestion I told you to add .toString() at the end of line 8.

Make it: gm.setPreference('req_id', g_form.getUniqueValue().toString());


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


@Sebas Di Loreto  i tried this but it's not working.

Vaishali11_0-1671613628003.pngVaishali11_1-1671613667893.png

you can see it's coming like this, all the records, but I want to display only the current request's record.

@Vaishali 11 

g_form.getUniqueValue() will work on form buttons only.

jaheerhattiwale_0-1671552743167.png

 

Is your ui action is form button?

 

Post full screen shot of ui action.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

yes it's a form button

but with unique value it's not working

@Vaishali 11 try changing req_id to sys_id.

It should work.

 

Please mark as correct answer if this solves your issue 

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023