Update Email field in Deal from contact details

Update Email field in Deal from contact details

Hi All,

Im starting using functions in zoho, i'm trying to fetch email address from contacts and set into a custom field ("Email") in Deals. By now I barely have this code, but is not working:

mp = zoho.crm.getRecordById("Deals",dealId); 
mp=map();
mp.put("Email",Email);
updateRecord = zoho.crm.updateRecord("Deals",dealId, mp);
info mp;
info updateRecord;

The arguments DealId is pointed to the Deal ID and the Email is pointing to Contact email.

Hope you can help me with this