Updating Deal Field from Deal Contact Role

Updating Deal Field from Deal Contact Role

To get the Your Contact Role Ids, see here

Change the Ids where required.

deal = zoho.crm.getRecordById("Deals", dealId);
dealContactRoles = zoho.crm.getRelatedRecords("Contact_Roles", "Deals", dealId);
mpRoles = map();
for each contact in dealContactRoles {
if(contact.get("Contact_Role") == '4566892000000006871') {
mpRoles.put("Developer_Evaluator", contact.get("id"));
}
else if(contact.get("Contact_Role") == '4566892000000006873') {
mpRoles.put("Decision_Maker", contact.get("id"));
}
else if(contact.get("Contact_Role") == '4566892000000006875') {
mpRoles.put("Purchasing", contact.get("id"));
}
}
updateDeal = zoho.crm.updateRecord("Deals", dealId, mpRoles);
info updateDeal;
    • Related Articles

    • Updating a Zoho CRM Subform (Accounts) from another Module (Deals)

      Updating a Zoho CRM Subform This script (courtesy of Zoho) will update existing records in a subform in one module (Accounts) from another Module (Deals). To create a cross-moduel subform entry (at creation for example), please see here ... ...
    • Finding Contact Role Ids in Your CRM

      Step 1: Setting Up OAUTH 1. Click Setup >> Connections >> Add Connection >> Zoho OAuth 2. Configure the connection as below: STEP 2: Functions | Create a New Function  & paste in the following code (change zohoapis.com to zohoapi.eu if applicable) ...
    • Event & Contact Sync between Office365 & Zoho CRM

      Connect your Meetings & Contacts between Zoho CRM and Microsoft Office 365.  in Office a new calender's is created called Zoho CRM, which you'll need to overlay in your Outlook. Events DO NOT sync to your personal calendar. The same applies to ...
    • IPT Connect with Zoho CRM (IP Telecom) - Admin and User

      IPT Connect with Zoho When you integrate your hosted PBX with your Zoho CRM, you can use the IPT Connect app to avail of the benefits of Zoho Phonebridge. With Zoho Phonebridge, you can manage incoming and outgoing calls. It also reminds you about ...
    • Sticky Notes in Zoho CRM

      Sticky notes in Zoho CRM are a great way to quickly jot down details about a call, a task or any other information that needs to be easily accessible. These are personal notes and not visible to other users in your CRM account. Sticky notes are ...