Automatic Scheduled Call

Automatic Scheduled Call

Hi

PLease can someone Help, I have written a script that will automatically add a scheduled call on a trigger, hoever it keep sadding the scheduled call as a closed activity. I cant seem to find the error

contactDetails = zoho.crm.getRecordById("Contacts",contactId);
createdtime = ifnull(contactDetails.get("Created_Time"),"").toTime("yyyy-MM-dd'T'HH:mm:ss").addDay(1);
mp = Map();
mp.put("Subject","Schedule Calls Test");
mp.put("Owner",ifnull(contactDetails.get("Owner"),"").get("id"));
mp.put("Call_Type","Outbound");
mp.put("$se_module","Contacts");
mp.put("Who_Id",contactId);
mp.put("Call_Start_Time",createdtime.toString("yyyy-MM-dd'T'HH:mm:ss+05:30"));
mp.put("$which_call","ScheduleCall");
create = zoho.crm.createRecord("Calls",mp);
info mp;
info create;


    Access your files securely from anywhere

        Zoho Developer Community




                                  Zoho Desk Resources

                                  • Desk Community Learning Series


                                  • Digest


                                  • Functions


                                  • Meetups


                                  • Kbase


                                  • Resources


                                  • Glossary


                                  • Desk Marketplace


                                  • MVP Corner


                                  • Word of the Day



                                      Zoho Marketing Automation


                                              Manage your brands on social media



                                                    Zoho TeamInbox Resources

                                                      Zoho DataPrep Resources



                                                        Zoho CRM Plus Resources

                                                          Zoho Books Resources


                                                            Zoho Subscriptions Resources

                                                              Zoho Projects Resources


                                                                Zoho Sprints Resources


                                                                  Qntrl Resources


                                                                    Zoho Creator Resources



                                                                        Zoho Campaigns Resources


                                                                          Zoho CRM Resources

                                                                          • CRM Community Learning Series

                                                                            CRM Community Learning Series


                                                                          • Kaizen

                                                                            Kaizen

                                                                          • Functions

                                                                            Functions

                                                                          • Meetups

                                                                            Meetups

                                                                          • Kbase

                                                                            Kbase

                                                                          • Resources

                                                                            Resources

                                                                          • Digest

                                                                            Digest

                                                                          • CRM Marketplace

                                                                            CRM Marketplace

                                                                          • MVP Corner

                                                                            MVP Corner





                                                                              Design. Discuss. Deliver.

                                                                              Create visually engaging stories with Zoho Show.

                                                                              Get Started Now