How to execute a CRM custom function OnSave a product? I got this already

How to execute a CRM custom function OnSave a product? I got this already

What I'm looking for is trying to fill the Unit Price field with the value of the Price 1 field converted to CAD 


on my ClientScript side I got this
  1. product_ID = $Page.record_id;
  2. var response = ZDK.Apps.CRM.Functions.execute("Product_OnSave", { "product_ID": product_ID });
  3. console.log(response);
This is the error I got when click the save button 



On my CRM custom function I got this

  1. //////////////////// Get currency exchange rate from USD ////////////////////
  2. response = invokeurl
  3. [
  4. url :"https://www.zohoapis.com/crm/v3/org/currencies"
  5. type :GET
  6. connection:"customfunction"
  7. ];
  8. usd_exchange_rate = response.get("currencies").get(1).get("exchange_rate").toDecimal();
  9. //////////////////// GET CURRTENT Product INFO  ////////////////////
  10. getProduct = zoho.crm.getRecordById("Products",product_ID);
  11. Owner = getProduct.get("Owner").get("id");
  12. price_1 = getProduct.get("Price_1").toNumber();
  13. unit_price_cad = price_1 / usd_exchange_rate;
  14. unit_price_cad = unit_price_cad.truncate(2); 
  15. //////////////////// UPDATE CURRTENT Product  ////////////////////
  16. product_upd = Map();
  17. product_upd.put("Unit_Price",unit_price_cad);
  18. product_upd.put("Modified_By",Owner);
  19. product_upd_resp = zoho.crm.updateRecord("Products",product_ID.tolong(),product_upd);
  20. info product_upd_resp;
  21. return product_upd_resp;
This function itself works as I want.