potDetails = zoho.crm.getRecordById("Deals",potId.toLong());//integration task /*Extracting details from the deal*/ quotesubject = ifnull(potDetails.get("Deal_Name"),""); contact = ifnull(potDetails.get("Contact_Name").get("id"),""); account = ifnull(potDetails.get("Account_Name").get("id"),""); description = ifnull(potDetails.get("Description"),""); RelatedProducts = zoho.crm.getRelatedRecords("Products","Potentials",potId.toLong()); product_items = List(); sub = 0.0; /*Extracting product details from the deal and adding it to quote*/ for each product in RelatedProducts { proid = product.get("id"); proname = product.get("Product_Name"); productDesc = ifnull(product.get("Description"),"Manque Description Produit !!!"); quantity = 1; price = ifnull(product.get("Unit_Price"),"0.0").toDecimal(); listprice = price * quantity; lineitem = Map(); lineitem.put("product",{"name":proname,"id":proid}); lineitem.put("product_description",productDesc); lineitem.put("quantity",quantity); lineitem.put("net_total",listprice); lineitem.put("total",listprice); lineitem.put("list_price",listprice); sub = sub + listprice; product_items.add(lineitem); } /*Storing quote details*/ paramap = Map(); paramap.put("Product_Details",product_items); paramap.put("Subject",quotesubject); paramap.put("Contact_Name",contact); paramap.put("Account_Name",account); paramap.put("Deal_Name",potId.toLong()); paramap.put("Sub_Total",sub); paramap.put("Grand_Total",sub); paramap.put("Description",description); createResp = zoho.crm.createRecord("Quotes",paramap); info paramap; info createResp; newid = createResp.get("id"); return "Success"; |
<response>=zoho.crm.getRecordById(<module_name>, <record_ID>, <connections>); |
Parameter | Description |
response | The response with the list of records matching the criteria. |
module_name string, mandatory | The API name of the module you want to fetch the records from. |
record_ID string, mandatory | The unique ID of the record. |
connections string, optional | The connectors that are associated with the function. |
potDetails = zoho.crm.getRecordById("Deals",potId.toLong()); |
Edition | Allowed Credits | Maximum credits that can be availed in a 24 hour window |
Starter | 5,000 credits + (Number of User licenses x 200) | 10,000 credits |
Standard | 5,000 credits + (Number of User licenses x 200) | 15,000 credits |
Professional | 5,000 credits + (Number of User licenses x 200) | 20,000 credits |
Enterprise/Zoho One/CRM Plus | 20,000 credits + (Number of User licenses x 500) | 1,00,000 credits |
Ultimate | 20,000 credits + (Number of User licenses X 1000) | 2,00,000 credits |
Functionality | Description | Limits |
Execution Time | Function should be executed within the specified time. | 1 minute |
Response Limit | Function should return the response within a particular size. | 10 MB |
Lines of execution | The number of lines in a function code has a limit. | 200,000 |
Send Mail | The number of emails that you can using the send mail syntax has a limit. | 1000 per day |
Webhooks | GET and POST URLs | 50,000 requests per day |
Writer is a powerful online word processor, designed for collaborative work.