What is the use of g_list.action() in a UI action ?

Gaurav Kumar15
Giga Guru

Hi All,

Just wanted to understand what is the use of below line in a UI action :-
g_list.action([sys_id of UI action], [Action Name]);

And also how can we get the sys id of the same UI action in the script itself as it should not be hardcoded.

Could someone help me in understanding the purpose of this, is this for redirecting post execution or something ? 


Thanks & Regards,
Gaurav

5 REPLIES 5

sethivarun
Kilo Guru

where are you seeing this code? can you provide us an example 

Thers is a UI action written on list menu, in which client side code is written and in the end i could see this line. I think it is only used for refreshing the page. When i comment it and run that, then it does its job but does not refresh.

So i am not sure exactly what it does.  

Aniko Hegedus1
Giga Contributor

It's for calling the same UI Action for initiating the server side code from the client side. 
It's basically the same as 
gsftSubmit(null, g_form.getFormElement(), 'action_name');
but for lists!

I figured out how to access the selected records on server side. Server side code is called for each selected record. You access it via current.getValue(). Is there a possibility to "pass" values from client side to server side?

I'm thinking of building a "Update selected" functionality, but only for certain fields. But I cannot (yet) figure out how to pass values from client side to server side, that is in the g_list.action example.