frappe-impl-clientscripts

Implement Frappe client-side form behavior with event patterns and APIs.

Updated May 31, 2026
One-click install
npx skills add https://github.com/anonymousminati/Res-POS --skill frappe-impl-clientscripts-anonymousminati
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-impl-clientscripts
Source: https://github.com/anonymousminati/Res-POS/tree/main/.claude/skills/impl/frappe-impl-clientscripts
Command: npx skills add https://github.com/anonymousminati/Res-POS --skill frappe-impl-clientscripts-anonymousminati

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you implement reliable client-side behavior in Frappe and ERPNext forms without guessing which event, API, or pattern to use, reducing broken UI logic and inconsistent form states.

Core Features & Use Cases

  • Form UX logic: Show or hide fields, toggle required states, set read-only properties, and add custom buttons at the right lifecycle event.
  • Data-driven interactions: Build cascading link filters, calculated fields, child table totals, and server-backed lookups with the correct client APIs.
  • Validation and debugging: Add safe synchronous or async validation, inspect form state in the browser console, and troubleshoot event timing issues.
  • Migration guidance: Move larger client scripts into a custom app for version control and deployment consistency.
  • Use case: An ERPNext team can use this Skill to create a Sales Order form that reveals fields based on status, filters dependent links, calculates totals, and validates data before save.

Quick Start

Use the frappe-impl-clientscripts skill to design the right Frappe client script workflow for your target DocType and desired form behavior.

Frequently Asked Questions about frappe-impl-clientscripts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a custom button to a Frappe client script at the correct form lifecycle event?

Frappe client scripts use the `setup` or `refresh` event to add custom buttons, ensuring the button renders when the form loads and persists across form state changes without duplication.

What's the best way to set up cascading link filters in ERPNext forms?

Setting up cascading link filters in ERPNext involves using the `frm.set_query` method within your client script to filter dependent link fields based on values selected in parent form fields.

How do I calculate child table totals and display them on the parent Frappe form?

Calculating child table totals on a Frappe form requires binding to child table events like `form_render` or `on_form_rendered`, iterating through the child rows, and updating a parent field using `frm.set_value`.

Why does my Frappe client script validation not working on async server calls?

Frappe client script validation fails on async server calls when the event handler does not return a Promise, causing the form to submit before the asynchronous `frappe.call` validation logic finishes executing.

Can I use frappe.db.get_value instead of frm.call for dynamic form lookups?

You can use `frappe.db.get_value` for synchronous client-side lookups of single field values, but `frm.call` or `frappe.call` is preferred for executing server-side methods and complex data-driven form interactions.

Do I need to move custom ERPNext form JavaScript into a custom app for version control?

Moving ERPNext form JavaScript into a custom app is necessary for version control and deployment consistency, allowing you to migrate large client scripts out of the standard DocType setup and into structured app files.