Using below script you can create record in zoho books

 organizationID = "xxxxxx";

itemList = List();

imap = Map();

imap.put("item_id","XXXXXXXX");

imap.put("quantity",1);

imap.put("rate",500);

itemList.add(imap);

info itemList;

params = Map();

params.put("customer_id","XXXXXXXX");

params.put("line_items",itemList);

res = zoho.books.createRecord("invoices", organizationID, params);

info res;

Here you can see some Example:-

for each  rev in Inv

{

pro = Add_Property[ID == rev.Property_Name];

myFieldMap = Map();

myFieldMap.put("name",pro.Property_Name_Number);

myFieldMap.put("description",rev.Job_Descriptions);

myFieldMap.put("unit","1");

myFieldMap.put("status","active");

myFieldMap.put("rate",rev.Final_Cost);

response = zoho.books.createRecord("items","20069576457",myFieldMap);

resID = response.get("item_id");

}
for each  new in Inv

{

itemList = List();

imap = Map();

imap.put("item_id",105821000000650383);

imap.put("quantity","1");

imap.put("rate",new.Final_Cost);

itemList.add(imap);

info itemList;

params = Map();

params.put("customer_id",105821000000036950);

params.put("status","active");

params.put("date",zoho.currentdate);

params.put("line_items",itemList);

res = zoho.books.createRecord("invoices","20069576457",params);

info res;

}

Vivek is the founder of Climb Solutions Info & zohopundit. He has more than 12 years of experience in Web Technology. He is an expert in Project Management, Team Management and complex web applications. He has excellent client relationship skills and knows how to drive a company to success.

― Vivek Pandey

Leave a Comment