get sys_id in ui action

Rosy14
Tera Guru

Hi,

how to get the sysy_id of the record in ui action?

2 ACCEPTED SOLUTIONS

Harish KM
Kilo Patron
Kilo Patron

Hi @Rosy14 is your UI Action server side? then use

var sysid = current.getValue('sys_id');

 

if it is client callable then use below

var sysid = g_form.getUniqueValue();

Regards
Harish

View solution in original post

shyamkumar VK
Kilo Patron

@Rosy14  , 

Server 

Current.getValue('sys_id');

Client Side :
g_form.getUniqueValue();
Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

View solution in original post

5 REPLIES 5

Maddysunil
Kilo Sage

@Rosy14 

You can use 

in server side: current.sys_id or in client side : g_form.getUniqueValue() 

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks

It is not working

Hi @Rosy14,

 

Try with current.getUniqueValue();


Feel free to mark helpful and correct! 👍🏻
Thanks,

Sagar Pagar

The world works with ServiceNow

Harish KM
Kilo Patron
Kilo Patron

Hi @Rosy14 is your UI Action server side? then use

var sysid = current.getValue('sys_id');

 

if it is client callable then use below

var sysid = g_form.getUniqueValue();

Regards
Harish