I am getting this error when I execute a custom function in zoho books. I can't seem to find any information on the error message so not sure how to solve.
Anyone have an idea what this error could be - "code":2,"message":"Invalid value passed for page_width"
estimateID = estimate.get("estimate_id");
organizationID = organization.get("organization_id");
estimateMap = zoho.books.getRecordsByID("estimates",organizationID,estimateID).get("estimate").toMap();
itemJSON = estimateMap.get("line_items").toList();
updatedLineItems = List();
updatedQuantity = Map();
quantity = 0;
rate2 = 0;
// Get items on Estimate
estimateItems = ifnull(estimateMap.get("line_items"),"");
// Parse items details from Estimate to a JSON list
itemlistJSON = estimateItems.toJSONList();
for each lineitem in itemlistJSON
{
// Setup a map of each item
itemdetails = lineitem.toMap();
}
// Get quantity of each line item on quote
itemQty = ifnull(itemdetails.get("quantity"),"0").toLong();
// Get rate of each line item on quote
itemRate = ifnull(itemdetails.get("rate"),"0").toLong();
// Get the item Id so we can dig into item details
itemId = itemdetails.get("line_item_id");
// skip to custom fields
// Get cf on Estimate
cfItems = ifnull(estimateMap.get("custom_fields"),"");
// Parse cf details from Estimate to a JSON list
cflistJSON = cfItems.toJSONList();
for each cfitem in cflistJSON
{
// Setup a map of each item
cfdetails = cfitem.toMap();
}
// Get the cf Id so we can dig into item details
cfId = cfdetails.get("customfield_id");
// get the cf value
cfvalue = cfdetails.get("value");
//if statement for applied to estimate type value
if(cfvalue == "Standard Support Estimate [Non-Retainer]")
{
estimateMap.put("quantity",qty);
}
response = zoho.books.updateRecord("Estimates",organizationID,estimateID,estimateMap);
info response;