I created custom functions inside of Leads, Contacts/Accounts and Potentials so that when an Event is created the address of the Lead/contact/account automatically get pulled into the location of the event, regardless of whether the event is started in Leads, Potentials or the Accounts/Contacts modules. I tried to do the same from the Quote module and it fails every time.
Originally the Quote function also had additional steps: in addition to the location address coming over i wanted the Account name to be moved into the subject of the event, the quote module custom field that stated "tech and hours needed" to go into the description field and the Potential module custom field that stated "Evaluation type" to be pushed into the quote event description as well.
eventIdStr=input.eventId.toString();
contDetails = zoho.crm.getRecordById("Potentials",input.installationOpportunitiesID);
street=ifnull(contDetails.get("Street"),"");
city=ifnull(contDetails.get("City"),"");
state=ifnull(contDetails.get("State"),"");
zip=ifnull(contDetails.get("Code"),"");
country=ifnull(contDetails.get("Country"),"");
address=(((street + " " + city + " " + state + " " + country) + " ") + zip) + " ";
mp=map();
mp.put("Venue",address);
updateResp = zoho.crm.updateRecord("Events",eventIdStr,mp);
info mp;
info updateResp;
eventIdStr = input.eventId.toString() ;
eventDetails = zoho.crm.getRecordById("Events", input.eventId);
module = ifnull(eventDetails.get("SEMODULE"),"") ;
id = ifnull(eventDetails.get("RELATEDTOID"),"") ;
if ( module == "Quotes")
{
quoteDetails = zoho.crm.getRecordById("Quotes", id.toLong());
accountid = ifnull(quoteDetails.get("ACCOUNTID"),"") ;
accDetails = zoho.crm.getRecordById(("Accounts") ,accountid.toLong()) ;
name = ifnull(accDetails.get("Account Name"),"") ;
street = ifnull(accDetails.get("Shipping Street"),"") ;
city = ifnull(accDetails.get("Shipping City"),"") ;
state = ifnull(accDetails.get("Shipping State"),"");
zip = ifnull(accDetails.get("Shipping Code"),"");
country = ifnull(accDetails.get("Shipping Country"),"");
address = ((street + " " + city + " " + state + " " + country) + " ") + zip ;
value = ifnull(quoteDetails.get("Tech and hours needed"),"");
mp = map() ;
mp.put("Subject",name);
mp.put("Venue",address);
mp.put("Description",value);
updateResp = zoho.crm.updateRecord("Events" ,eventIdStr ,mp ) ;
info mp;
info updateResp;
}