What problem does it solve?
This Skill helps you implement Frappe/ERPNext client-side form logic that behaves correctly across form load, user interactions, and child-table updates, preventing subtle UI bugs and production failures caused by incorrect event usage or missing refresh patterns.
Core Features & Use Cases
- Event-driven client script workflows: Step-by-step guidance for choosing the correct client script event (setup, refresh, validate, field handlers, child table events) to match the desired behavior and timing.
- Field dependencies and UI rules: Clear instructions for implementing show/hide, required toggling, cascading link filters, and computed totals with the correct event combinations.
- Server-call integration from the browser: Practical patterns for deciding between frappe.db.get_value, frm.call, frappe.call, and frappe.xcall and using async/await safely during validation.
- Custom button and debugging patterns: Rules for adding buttons in refresh with correct guards, plus concrete browser debugging steps using DevTools and handler inspection.
- Migration to a custom app: How to move a Client Script document into version-controlled assets using hooks and public JS files.
Use case example: You need a Sales Order UI where delivery_date appears only when requires_delivery is checked, city options depend on country, and invoice totals update live when child rows change; this Skill provides the exact event strategy and code structure to make it robust.
Quick Start
Implement a Frappe client script for DocType Sales Order that toggles the delivery_date field based on requires_delivery and recalculates totals from the child table, including the correct refresh plus field handlers, server-call validation pattern, and migration steps to a custom app.