ERPNext Server Script API call returns 200 but does not update database or return response
I’m trying to update Sales Order Items in ERPNext using a Server Script of type API. I want to hit the endpoint from Postman and update custom fields (custom_buying_price, custom_qty) in the Sales Order Item child table. Here’s my script: def custom_update_so_items(sales_order, items=None): """ Update Sales Order items (qty, rate, custom fields) with validations. Works for draft and submitted Sales Orders. """ try: # Parse JSON items if string if isinstance(items, str): items = frappe.parse_json(items) if not items: return {"status": "error", "message": "Parameter 'items' is required."} # Load
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.