I have a form that has multiple CRM Product lookup fields, below those fields are Quantity fields. Anyway I got it to work that when you choose multiple products and quantities it auto calculates the total in real time. So that works, it is great.
(All 10 CRM Product lookup fields on the form have this script on user input. It works fine.)
- crmResp = zoho.crm.getRecordById("Products", input.Sample1_ID);
- input.Sample1Cost = ((crmResp.get("Cost (L)")).toDecimal() * input.Qty1);
- input.CostTotal = (input.Shipping_Cost + input.Sample1Cost + input.Sample2Cost + input.Sample3Cost + input.Sample4Cost + input.Sample5Cost + input.Sample6Cost + input.Sample7Cost + input.Sample8Cost + input.Sample9Cost + input.Sample10Cost);
I have another form in the same application that I have set to insert a record into the first form On Add -> Success. I have gotten the record insert to work, it creates a record in the first form and part of that record contains multiple CRM Product selections.
The problem I am having is the CRM Product lookup fields are not calculating on the inserted records in the first form. It shows the products and quantities as selected just like it should
, but it does not seem to register with my calculation script. If I go into a CRM Product lookup on one of the inserted records and reselect the same product, it calculates fine.
So does anyone have an idea or know of a nice trick that I can use to reload the CRM Product lookup fields of the inserted records to get them to refresh?