Deal Field values copied into Project custom module
I'm struggling with this:
- I have a Deal field called 'Service'
- 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
- contDetails = zoho.crm.getRecordById("Primary_Module_API", input.ContId.toLong());
- mp=map();
- mp.put("Secondary_field_1",ifnull(contDetails.get("Primary_Field_1"),""));
- mp.put("Secondary_field_2",ifnull(contDetails.get("Primary_Field_2"),""));
- mp.put("Secondary_field_3",ifnull(contDetails.get("Primary_Field_3"),""));
- mp.put("Secondary_field_4",ifnull(contDetails.get("Primary_Field_4"),""));
- mp.put("Secondary_field_5",ifnull(contDetails.get("Primary_Field_5"),""));
- updateResp= zoho.crm.update("Secondary_Module_API",input.AccId.toLong(), mp);
- info mp;
- info updateResp;