If I am running a custom function in workflow rules and it asks me for input for the deal ID when I click save and execute. But when I click save it says successful. How can I get it to give me all the records? I'm trying to create records from deals to a custom module called tours.
dealId = input.dealId.toLong();
dealDetails = zoho.crm.getRecordById("Deals",dealId);
mp = Map();
mp.put("Client_Name",ifnull(dealDetails.get("Deal_Name"),""));
mp.put("Mobile",ifnull(dealDetails.get("Mobile"),""));
mp.put("Returned_Client",ifnull(dealDetails.get("Returned_Client"),""));
mp.put("Belongs_To",ifnull(dealDetails.get("Who's_Client"),""));
mp.put("Age_Range",ifnull(dealDetails.get("Ages"),""));
mp.put("Tour_1_Booked",ifnull(dealDetails.get("Tour_1_Booked"),""));
mp.put("Date/Time_1",ifnull(dealDetails.get("Date/Time_1"),""));
mp.put("Amount_of_People_Booked_1",ifnull(dealDetails.get("Amount_of_People_Booked_1"),""));
mp.put("Tour_Guides_1",ifnull(dealDetails.get("Tour_Guides_1"),""));
mp.put("Total",ifnull(dealDetails.get("Total_Tour_Cost_Before_VAT"),""));
mp.put("Deposit",ifnull(dealDetails.get("Deposit_Before_VAT"),""));
mp.put("Method_of_Payment",ifnull(dealDetails.get("Method_of_Payment"),""));
trigger_workflow = "Lead_Status == Booked";
trigger_workflow = "Stage == CFC_Received_Closed_Won";
create = zoho.crm.createRecord("Tours",mp);
info mp;
info create;
Thank you!