Deal Field values copied into Project custom module

Deal Field values copied into Project custom module

I'm struggling with this:
  1. I have a Deal field called 'Service'
  2. I have a custom module 'Project' field name 'Service'
When a Deal is created or edited, I want to copy the value from Deal module Service to Project module Service.

I found a function, but it will not allow me to start the trigger from the Deal Object. I would like the fields on the Project module to be updated when the Deal is edited. Thank you


  1. contDetails = zoho.crm.getRecordById("Primary_Module_API", input.ContId.toLong());
  2. mp=map();
  3. mp.put("Secondary_field_1",ifnull(contDetails.get("Primary_Field_1"),""));
  4. mp.put("Secondary_field_2",ifnull(contDetails.get("Primary_Field_2"),""));
  5. mp.put("Secondary_field_3",ifnull(contDetails.get("Primary_Field_3"),""));
  6. mp.put("Secondary_field_4",ifnull(contDetails.get("Primary_Field_4"),""));
  7. mp.put("Secondary_field_5",ifnull(contDetails.get("Primary_Field_5"),""));
  8. updateResp= zoho.crm.update("Secondary_Module_API",input.AccId.toLong(), mp);
  9. info mp;
  10. info updateResp;