Error in CRM task - SearchRecrods

Error in CRM task - SearchRecrods

Hi,
I am trying to fetch data from CRM to ZOHO Creator on User input of a fields like here "Accounts" using "SearchRecrods" task. 

It is working fine for when every respective fields have values in CRM response but  what I notice that when any of the fields in CRM of any record is blank then I got the below error it seems the response can't handle null value or it doesn't include this field in JSON list even. so script can't iterate the list. I tried to use "ifnull" but not working so. 

for instance here you can see the variable " Precio" can't update  and I checked my CRM data there I have found there are some records in CRM for this account have blank  so this is causing error.


Any anyone help me to fix it ? Thanks.

Here is the code and screenshots

  1. AccName = (input.Account).toString();
  2. contact_search = zoho.crm.searchRecords("CustomModule1", (("(Account Name|==|") + AccName) + ")", 1, 200);
  3. lin = "[" + contact_search + "]";
  4. lines = lin.toJSONList();

  5. for each line in lines
  6. {
  7.   
  8.     Warehouse_Receipts = (ifnull(line.getJSON("Warehouse Receipt"),"Not Found")).toString();
  9.     Tracking_Numbers = (ifnull(line.getJSON("Tracking Number"),"Not Found")).toString();
  10.     status_crm = (ifnull(line.getJSON("Status"),"Not Found")).toString();
  11. Precio = ( ifnull(  line.getJSON("Precio de Venta x Kg") ,"0.0")  ) .toDecimal();
  12. Peso = (   ifnull(      line.getJSON("Peso en Paraguay (Kg)")  ,"0.0")  ).toDecimal();
  13.     insert into On_Hand_Receipts
  14.     [
  15.         Added_User = zoho.loginuser
  16.         Warehouse_Receipt = Warehouse_Receipts
  17.         Tracking_Number = Tracking_Numbers
  18.         Status = status_crm
  19.         Weight = Peso
  20.         Rate = Precio
  21.         Account = input.Account
  22.         Account_ID = input.Account_ID
  23.     ]
  24. }



error :