deal = zoho.crm.getRecordById("Deals",DealId);
// customization block:
// replace your client id and api key here
// you can find the client id and api key in Ideolve console - Profile - Connect to other apps - Select Zoho CRM - choose tab : Configure ZohoCRM
connectorClientId = "replace your client id here"
apiKey = "replace your api key here"
info deal;
notetext = "Deal
Account Name: " + deal.get("Account_Name") + "
Amount: " + deal.get("Amount") + "
Campaign_Source: " + deal.get("Campaign_Source") + "
Closing_Date: " + deal.get("Closing_Date") + "
Contact_Name: " + deal.get("Contact_Name") + "
Created_By: " + deal.get("Created_By") + "
Currency: " + deal.get("Currency") + "
Deal_Name: " + deal.get("Deal_Name") + "
Owner: " + deal.get("Owner") + "
Description: " + deal.get("Description") + "
Exchange_Rate: " + deal.get("Exchange_Rate") + "
Expected_Revenue: " + deal.get("Expected_Revenue") + "
Lead_Source: " + deal.get("Lead_Source") + "
Modified_By: " + deal.get("Modified_By") + "
Next_Step: " + deal.get("Next_Step") + "
Prediction_Score: " + deal.get("Prediction_Score") + "
Probability: " + deal.get("Probability") + "
Stage: " + deal.get("Stage") + "
Type: " + deal.get("Type");
header = {"event-origin":"ZohoCRM","event-type":"AddComment","connector-client-id":connectorClientId,"x-api-key":apiKey,"Content-Type":"application/json"};
bodyMp = {"notehtmltext":notetext,"leadNo":AccountId.toString(),"module":"Accounts"};
response = invokeurl
[
url :"https://api.ideolve.com/v3/connector/event"
type :POST
parameters:bodyMp.toString()
headers:header
];
info response;