trigger workflow of lead from custom function of another module?
i am creating a new lead from custom function of a custom module name "Web Leads"
but when the new record in created in lead its not running the workflow of lead .
i have created a worflow in leads that send email when new lead is created.
this is the custom function
- New_Lead = Map();
-
- New_Lead.put("First_Name",name.getPrefix(" "));
- New_Lead.put("Last_Name",name.getSuffix(" "));
- New_Lead.put("Phone",striped_phone);
- New_Lead.put("Email",email);
- New_Lead.put("Lead_Source",lead_source);
- New_Lead.put("Lead_Status","New");
- New_Lead.put("Street_Address",street_address);
- New_Lead.put("City",city);
- New_Lead.put("State",state);
- New_Lead.put("Zip_Code",zip_code);
- Lead_update_option=Map();
- Lead_update_option.put("wfTrigger",true);
- lead_created = zoho.crm.createRecord("Leads",New_Lead,Lead_update_option);