title: frappe trigger field update via custom script
body: <p>I'm customizing an existing DocType(quotation) and I've added fields to the <code>Quotation Item</code> child table which affect the <code>amount</code> field of an Item. By default, i.e. before customizations, the grand_total, and Quotation net_totals get calculated as soon as an Item changes. But now that I have custom fields, how can I call the hypothetical &quot;refresh&quot; functions that do the default calculation?</p>
  <p>Here is my current Custom Script that updates the Item amount on <code>Quotation Item</code> child table:</p>
  <pre class="lang-js prettyprint-override"><code>frappe.ui.form.on(&quot;Quotation Item&quot;, &quot;paint&quot;, function(frm, doctype, name) {
    let row = locals[doctype][name];
    
    let rate = row.labour + row.trim + row.paint + row.spares;
    row.rate = rate;
    let total = rate * row.qty
    row.amount = total;
    refresh_field(&quot;items&quot;);
  });
  </code></pre>