Contact to deal with variables during conversion?
I got my button working in each contact to create a deal using this code
- contDetails = zoho.crm.getRecordById("Contacts",contId.toLong());
- PotentialMap = Map();
- PotentialMap.put("Deal_Name",ifnull(contDetails.get("Full_Name"),""));
- PotentialMap.put("City",ifnull(contDetails.get("City"),""));
- PotentialMap.put("Country",ifnull(contDetails.get("Country"),""));
- PotentialMap.put("State",ifnull(contDetails.get("State_Region"),""));
- PotentialMap.put("Street",ifnull(contDetails.get("Street_Address1"),""));
- PotentialMap.put("Zipcode",ifnull(contDetails.get("Zip1"),""));
- PotentialMap.put("Description",ifnull(contDetails.get("Description"),""));
- PotentialCreate = zoho.crm.createRecord("Deals",PotentialMap);
- PotentialMap.put("Lead_Type",ifnull(contDetails.get("Lead_Type"),""));
- PotentialMap.put("Cash_Or_Financing",ifnull(contDetails.get("Cash_Or_Financing"),""));
- PotentialMap.put("Layout",ifnull(contDetails.get("Layout"),""));
- PotentialMap.put("Property_Type",ifnull(contDetails.get("Property_Type"),""));
- PotentialMap.put("Type",ifnull(contDetails.get("Lead_Type"),""));
- PotentialMap.put("Zestimate",ifnull(contDetails.get("Zestimate"),""));
- info PotentialCreate;
- return "";
But I need to take it a step further.
When I click the "Create Deal" button I made, I want a pop up to ask me which property is the deal for? and when I chose a property I want the deal to be named the exact same thing as the property they chose.
Properties is a custom module, each entry in the custom module is put into the module via an external api.
Can someone help me with the code for this?