How to add selected contacts to a function?

How to add selected contacts to a function?

Hello! 
Could you please explain me, how can I catch an event select a contact and transfer it to a function?
I mean this -  http://prntscr.com/gslyoy

When I select entries in the record list and click on the function, how do I catch these entries in the function?

zoho.crm.getRecords or zoho.crm.getRecordById ?

For example, I do not need all the data about the record but only their IDs transmitted from the page. 

Best regards,
Alexandr