Creating Convert Button From Custom Module to Lead Module

Creating Convert Button From Custom Module to Lead Module

Hello I am getting an error on Line 2 of my code stating: 'TEXT' can not be cast to 'Long'.

Here is my code:

      archiveIdLong = input.archiveId.toLong();
      archiveDetails = zoho.crm.getRecordById("Archive", archiveIdLong);
      first = ifnull(archiveDetails.get("First Name"),"");
      last = ifnull(archiveDetails.get("Last Name"),"");
      name = first + " " + last;
      LeadMap = map();
LeadMap.put("First Name", ifnull(archiveDetails.get("First Name"),""));
LeadMap.put("Last Name", ifnull(archiveDetails.get("Last Name"),""));
LeadMap.put("Mailing City", ifnull(archiveDetails.get("City"),""));
LeadMap.put("Mailing Country", ifnull(archiveDetails.get("Country"),""));
LeadMap.put("Mailing State", ifnull(archiveDetails.get("State"),""));
LeadMap.put("Mailing Street", ifnull(archiveDetails.get("Street"),""));
LeadMap.put("Mailing Zip", ifnull(archiveDetails.get("Zip Code"),""));
LeadMap.put("Description", ifnull(archiveDetails.get("Description"),""));
LeadMap.put("Fax", ifnull(archiveDetails.get("Fax"),""));
LeadMap.put("Title", ifnull(archiveDetails.get("Title"),""));
LeadMap.put("Email", ifnull(archiveDetails.get("Email"),""));
LeadMap.put("Lead Source", ifnull(archiveDetails.get("Lead Source"),""));
LeadMap.put("Lead Status", ifnull(archiveDetails.get("Lead Status"),""));
LeadMap.put("Interested in", ifnull(archiveDetails.get("Interested in"),""));
LeadMap.put("Mobile", ifnull(archiveDetails.get("Mobile"),""));
LeadMap.put("Phone Number", ifnull(archiveDetails.get("Phone Number"),""));
LeadMap.put("Secondary Email", ifnull(archiveDetails.get("Secondary Email"),""));
LeadMap.put("Skype ID", ifnull(archiveDetails.get("Skype ID"),""));
LeadMap.put("Twitter", ifnull(archiveDetails.get("Twitter"),""));
LeadCreate = zoho.crm.create("Lead", LeadMap);
newleadId = LeadCreate.get("Id");
return "Success";

Can someone tell me the issue? I would like for an "Archive" to be able to be converted back to a Lead with using a button. 
In the Edit Arguments I have chosen Archive Id as the value and named it "archiveId"