//Fetch Invoice Account
v = zoho.crm.getRecordById("Invoices",vId);
v_id = v.get("Account_Name").get("id");
//Fetch Related Price Book
books = zoho.crm.getRecords("Price_Books");
for each book in books
{
book_account = book.get("Account").get("id");
if(book_account == v_id)
{
related_book = book.get("id");
}
}
//Apply Price Book
pdlist = List();
pdet = v.get("Product_Details");
for each prod in pdet
{
mp = Map();
mp.put("book",related_book);
}
update = zoho.crm.updateRecord("Invoices",vId.toLong(),mp);