How take the id leads?

How take the id leads?

hello
please help me
I want take the ID leads in custom functions, I am try this way but it not work


CG = zoho.crm.getRecordById("Leads",input.CGID.toLong());
CareGid=CG.get("id");