Knowledge base / Since 1999
Advanced
search
Practical notes on CRM development, automation, APIs and everyday IT.
Browse all notes66 results
Zoho Deluge: Post a multi-dimensional or nested array to a 3rd-party API
... request to an API which is expecting nested/2d/multi-dimensonal arrays. In the example below, we are posting to a PHP script for testing but I have since sent something similar to an API expecting nested arrays (not sure if they were PHP) ...
Import Excel CSV file as JavaScript array
... read the file (stored on the server) and convert to a JavaScript array of objects var my_object_array = [ { my_col1_val: 'item1a', my_col2_val: 'item2a' }, { my_col1_val: 'item1b', my_col2_val: 'item2b' }, { my_col1_val: 'item1c', my_col2_v ...
Sort an associative array by values in Javascript
What? An article on how to quickly adapt an array code and sort by its values. Surprising how many examples are on the web and everyone saying you're doing it wrong... Which is true but quite unhelpful. The original code is not my own eithe ...
Zoho CRM Client Script: Map Quote to Invoice
... Name:equals:" + o_QuoteDetails.id + ")"); // convert to a usable array var a_QuotedSalesOrders = typeof a_QuotedSalesOrders === "string" ? JSON.parse(a_QuotedSalesOrders) : a_QuotedSalesOrders || []; // set first valid sales order ID var v_ ...
ZohoCreator: Basic Widget with Zoho Data
... ) .then(function(response) { // store the search results into an array var recordArr = response.data; // quick loop to find the preferred name for(var index in recordArr){ v_GreetingName = recordArr[index].Nick_Name; break; } // if not blan ...
Zoho Books: Error 7008: There are no contact persons associated with this Invoice
... be added (don't ever remember having to do this) as contact_ids (array/list). Instead the below script will show you how to use this API having a few email addresses as the recipients: A sample code snippet: For the below, I have a connecti ...
ZohoCRM Webhook: Create ZohoInventory Records from an eBay order
... "); m_Params.put("DetailLevel","ReturnAll"); // // send an order array l_OrderIDs = List(); m_OrderID = Map(); m_OrderID.put("OrderID",p_eBayOrderRef); l_OrderIDs.add(m_OrderID); m_Params.put("OrderIDArray",l_OrderIDs); // // convert to xml ...
Zoho Deluge: Get All Orders from eBay
... v_OrderNodePart = "Order"; v_OrderNodeName = v_OrderNodePart + "Array"; // // check node is paired to closing tag if(x_ResponseBody.contains("</" + v_OrderNodeName + ">")) { x_OrderNode = x_ResponseBody.subString(x_ResponseBody.indexOf("<" ...
ZohoCRM: Get Organization Business Hours using Deluge/API
... end the following code which loops through the map / associative array we just created and shove this onto every employee's record. My employee record form is called "Staff" and the subform is called "Usual Shift" containing the columns "Da ...
ZohoCRM: Get All eBay Active Listings
... onse v_ItemNodePart = "Item"; v_ItemNodeName = v_ItemNodePart + "Array"; x_ItemNode = x_ResponseBody.subString(x_ResponseBody.indexOf("<" + v_ItemNodeName),x_ResponseBody.lastIndexOf(v_ItemNodeName) + v_ItemNodeName.length() + 1); l_Items = ...
ZohoDeluge: Get All eBay Orders Given a From and Till Date
... v_OrderNodePart = "Order"; v_OrderNodeName = v_OrderNodePart + "Array"; x_OrderNode = x_ResponseBody.subString(x_ResponseBody.indexOf("<" + v_OrderNodeName),x_ResponseBody.lastIndexOf(v_OrderNodeName) + v_OrderNodeName.length() + 1); l_Ord ...
Zoho CRM: Manage a subform using Client Script
... **** // declare the new row and JSON argument var json_Row = new Array(); var json_Arg = new Object(); // get some values beforehand which allows us to compare to the rows already present in the subform // first column to add in this row is ...