Button in custom module to create a new Deal

Button in custom module to create a new Deal

We have a custom module that we'd like a button to create a new Deal. The custom module has some information we'd like to transfer over to make a new Deal. 

We have written a function for this button. When the button is clicked, it shows an error.

Here is the code we have:

StringConvertToDeal(String CustommoduleId)
  1. customModuleDetails = zoho.crm.getRecordById("CustomModule5",input.CustommoduleId);
  2. mp = Map();
  3. mp.put("Deal_Name",ifnull(customModuleDetails.get("Name"),""));
  4. mp.put("Account_Name",ifnull(customModuleDetails.get("Account_Name"),""));
  5. mp.put("Contact_Name",ifnull(customModuleDetails.get("Contact_Name"),""));
  6. createDeal = zoho.crm.createRecord("Deals",mp);
  7. info mp;
  8. info createDeal;
  9. return "";
We believe the issue is in Line 1,  getting the ID for the custom module record. The documentation for doing this does not provide information on getting the record ID for a custom module record: https://help.zoho.com/portal/en/community/topic/custom-function-28-transfer-record-information-from-one-module-to-another-based-on-specific-criteria

Additionally, a button needs a return value. What value is needed inside the "" on Line 9?