Hi everybody,
it has been a long time since I posted a topic. Today however, warrants a comeback as I personally think that this information would be beneficial for the community. If you are looking to update or create a deal and want to specify a pipeline, please note that you cannot do it using Deluge, as in zoho.crm.updateRecord or zoho.crm.createRecord. You might notice that zoho.crm.getRecordById or getRecords also do not include the Pipeline information in the return values.
The only way to do it; either to get, update, or create with a Pipeline value is to do it using RESTAPI. Since V2.1, this has been supported, I believe. The method is still simple; just pass a value to "Pipeline" key with the actual name of the pipeline. This is the V7 documentation on it,
https://www.zoho.com/crm/developer/docs/api/v7/insert-records.html. And please note that this method now allows multiple records creation, so you would to pass the value of "data" as an array, e.g:
- fieldValues = Map(); //this is the map data type to host all the fields' values in 1 record
- fieldValues.put("Pipeline","your pipeline name");
- fieldValues1 = Map(); //this is the map data type to host all the fields' values in another record, different from above
- fieldValues1.put("Pipeline","your pipeline name");
- recordlist = List(); //this is to hold all the information of the multiple records. you might have fieldValues, fieldValues1, etc
- recordlist.add(fieldValues,fieldValues1);
- dataValues = Map();
- dataValues.put("data",recordlist);
- createRecords = invokeUrl
- [
- url: "https://www.zohoapis.com/crm/v7/Deals"
- type: POST
- parameters: dataValues.toString() //dont ask me why we have to put toString. In my experience, it doesnt work if we dont do this
- connection: "yourConnectionName"
- ];
This is specifically for creating new deal records.
On that note,
This might be just me, but I do find it a little bit weird not to have this capability in normal Deluge. We all know that Deluge is far easier to write and to understand than RESTAPI. The exclusion of some select information is thus perplexing to say the least. This prevents the users from just doing something in one method and effectively forcing them to learn RESTAPI as well, when they don't need to if Deluge is good enough. This roadblock certainly adds to the level of complexity of learning custom function in Zoho CRM.
I hope the product team sees this and starts to wonder from the users' point of view. What makes sense, and what doesn't.
As always, good luck.