Hi,
I have a Workflow to create an event and email the Lead based, however I would like to avoid sending the Description of the event in the email as this is meant for our reps.
Is anyone able to direct me as to how I can do this with Deluge?
Current script is below, thank you
leadInfo = zoho.crm.getRecordById("Prospects",id);
leadEmail = ifnull(leadInfo.get("Email"),"");
notes = zoho.crm.getRelatedRecords("Call_Notes","Prospects",id);
startDateTime = ifnull(leadInfo.get("Meeting_Date"),"");
endDateTime = startDateTime.toDateTime("yyyy-MM-dd'T'HH:mm:ss'+00:00'").addHour(2).toString("yyyy-MM-dd'T'HH:mm:ss'+00:00'");
info endDateTime;
companyname = ifnull(leadInfo.get("Registered_Name"),"");
info companyname;
leadId = leadInfo.get(id);
ownerId = leadInfo.get("Owner");
notes = ifnull(leadInfo.get("Call_Notes"),"");
lineOne = ifnull(leadInfo.get("Address_Line_1"),"");
lineTwo = ifnull(leadInfo.get("Address_Line_2"),"");
city = ifnull(leadInfo.get("City"),"");
county = ifnull(leadInfo.get("County"),"");
code = ifnull(leadInfo.get("Postcode"),"");
meetingTitle = companyname + " - Envera Group Meeting";
fullAddress = lineOne + ", " + lineTwo + ", " + city + ", " + county + " " + code;
eventmap = Map();
eventmap.put("Owner",ownerId);
eventmap.put("Venue",fullAddress);
eventmap.put("$se_module","Prospects");
eventmap.put("Start_DateTime",startDateTime);
eventmap.put("End_DateTime",endDateTime);
eventmap.put("Event_Title",meetingTitle);
eventmap.put("What_Id",id);
eventmap.put("Description",notes);
eventmap.put("send_notification",true);
recipients = list();
recipientMap = {"invited":true,"type":"email","participant":leadEmail,"status":"not_known"};
recipients.add(recipientMap);
eventmap.put("Participants",recipients);
createEvent = zoho.crm.createRecord("Events",eventmap);
info eventmap;
info createEvent;