Insert Record hanging in Stateless form
mQuotation = Vehicle_Quotation [Quotation_ID == input.Quotation];
mFields = getFieldNames();
mID = zoho.currenttime.toString();
mData = map();
for each mKey in mFields
{
mData.put(mKey, getFieldValue(mKey));
}
mQuotation.Status = "Reissued";
insert into Vehicle_Quotation
[
Added_User = zoho.adminuser
Bank = mData.get("Bank")
Book_Days = (utilities.configuration.Setting("Default_Booked_Days").toLong() + (mData.get("Book_Days")).toLong() - 3)
Color = mData.get("Color")
Customer = mData.get("Customer")
Delivery = mData.get("Delivery")
Discount = (mData.get(("Discount"))).toLong()
Down_Payment = (mData.get("Down_Payment")).toLong()
Given_By = {"", ""}
Include_Standard_Specs = (mData.get("Include_Standard_Specs").contains("true"))
Insurance = (mData.get("Insurance")).toLong()
List_Price = (mData.get("Lost_Price")).toLong()
Model = mData.get("Model")
Payment_Mode = mData.get("Payment_Mode")
Quotation_ID = mID
Registration_Fee = (mData.get("Registration_Fee")).toLong()
Sale_Ranking = mData.get("Sale_Ranking")
Salesman = mData.get("Salesman")
Service_Contract = (mData.get("Service_Contract")).toLong()
Special_Specs = mData.get("Special_Specs")
Specs = mData.get("Specs")
Standard_Specs = mData.get("Standard_Specs")
Status = "Open"
Total = (mData.get("Total")).toLong()
Vehicle = mData.get("Vehicle")
Verbose = (mData.get("Verbose").contains("True"))
]
mQuotation = Vehicle_Quotation [Quotation_ID == mID];
mQuotation.Quotation_ID = (((mQuotation.ID.toString()).subString(11,18)) + " ") + mQuotation.Customer;
alert("Quotation has been reissued...!");