Hello everyone,
I add “in_words” field in Payment Request doctype. I use client script to call money_to_words function in utils of frappe but it doesn’t work.
I think, It seems that the frappe.utils.data.money_in_words function is not whitelisted.
Whitelisting is a security feature that restricts access to server-side functions. You need to whitelist the function before you can use it in your client-side scripts.
After I had researched in community, I knew that: only use script API in server scripts (can’t use “import” syntax and “doc” is representative for “cur_frm” → right ?)
# Get the document to be updated
doc = frappe.get_doc("Doctype Name", "Document Name")
# Update the field value
frappe.db.set_value("Doctype Name", "Document Name", "field_name", "new_value")
# Save the document
doc.save()
Both of them are passed by specific detail “Documet Name” argument, but I want to pass it automatically and update multiple records into database.
You have any solution