Sync custom module ID to Lead module

Sync custom module ID to Lead module

Hello,

I am trying to sync Contract ID (custom module) from Deal module. I have an existing function that whenever a contract is created, it will automatically creating deals based on the frequency of the contract. Now i am having problem to show the contact number and contract ID in the Deal module. please see function below.

if(visitdate1 != null)
{
Dealname1 = Dealname + " - Visit 1 ";
PotentialMap = Map();
PotentialMap.put("Interested_Services1",ifnull(interestedServices,""));
PotentialMap.put("Deal_Type","Contract");
PotentialMap.put("Related_Country",ifnull(contDetails.get("Related_Country"),""));
PotentialMap.put("Amount",ifnull(finalamount_str,""));
PotentialMap.put("Deal_Name",ifnull(Dealname1,""));
PotentialMap.put("Closing_Date",ifnull(currentDate,""));
PotentialMap.put("Job_Date",ifnull(visitdate1,""));
PotentialMap.put("Stage","Booked");
PotentialMap.put("Payment","No Prepayment");
PotentialMap.put("Contact_Name",ifnull(contDetails.get("Contact_Name"),"").get("id"));
PotentialMap.put("Contract",contId);
PotentialMap.put("Owner",ifnull(contDetails.get("Owner"),"").get("id"));
PotentialCreate = zoho.crm.createRecord("Deals",PotentialMap);
info PotentialCreate;

I want to add these 2 fields - Primary Phone and Contract ID