@rmehta Any solutions for this??
Finally, I found the solution for this problem through API.
Scenario: Want to update the child table row in a single doctype based on the value change in another single doctype. Here,
parameters - child table fieldname
@frappe.whitelist(allow_guest=True)
def update_template(template_id):
updates = frappe.get_doc(‘SMS Settings’)
parameters = frappe.get_single(‘SMS Settings’).parameters
for u in parameters:
if u.parameter == ‘TemplateID’:
u.update({
‘parameter’:‘TemplateID’,
‘value’:template_id
})
updates.parameters.append(u)
updates.save()
frappe.db.commit()
return updates
What will be script if we want to update child table column “total” in all 5 rows , if the field on the same doctype form gets updated ?