How to get computer sys_id in List context menu UI Action as a client side script?

khail
Kilo Contributor

I know it can be done in current.sys_id in server side script but I wanted to get it from the client side. I am done getting the information when I am in the form using the g_form.getUniqueValue() but what I wanted when I trigger a UI Action in List context menu and get the sys_id in my client side script.

1 ACCEPTED SOLUTION

VigneshMC
Mega Sage

g_list.getChecked()

 

provides Comma-separated list of the sys_ids for the items that are checked in the list.

also try 

var sysId = typeof rowSysId == 'undefined' ? gel('sys_uniqueValue').value : rowSysId;

Thanks

View solution in original post

6 REPLIES 6

VigneshMC
Mega Sage

g_list.getChecked()

 

provides Comma-separated list of the sys_ids for the items that are checked in the list.

also try 

var sysId = typeof rowSysId == 'undefined' ? gel('sys_uniqueValue').value : rowSysId;

Thanks

khail
Kilo Contributor

Is it possible to get without selecting the checkbox?

Without selecting check box, how would you come to know on which record the action should be performed?

 

Detailed use case would be helpful to understand the requirement and suggest the solution.

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Try 

var sysId = typeof rowSysId == 'undefined' ? gel('sys_uniqueValue').value : rowSysId;