Current Request sys_id on ui action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 02:26 AM
How to get the sys_id of a current request in an ui action which is running on the task table?
Thanks,
Vaishali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 06:07 AM
Ok, no problem. Any suggestions on how that can be done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 06:40 AM
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.
And this is how it looks when you pressed it.
What is not working for you?
If I helped you with your case, please click the Thumb Icon and mark as Correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 06:48 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 06:56 AM
I am not sure if this will help but try it.
Put .toString() at the end like this.
If I helped you with your case, please click the Thumb Icon and mark as Correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 07:01 AM
Hi Sebastian,
this is the ui action which I created:-
and the script is as below:-
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.