Hi @pm23,
Please check the post.
syntax like (Server Script)
def on_update(doc, event):
# Create a new Latest Purchase Price document
lpp_doc = frappe.new_doc("Latest Purchase Price")
lpp_doc.item_name = doc.item_name
lpp_doc.item_code = doc.item_code
lpp_doc.updated_date = frappe.utils.now_datetime()
lpp_doc.rate = doc.rate
lpp_doc.insert(ignore_permissions=True)
When you save the Item and Latest Purchase Price will be created. So have to add logic as per your scenario and also update the field name and doctype.
Thank You!