openaec-foundation/frappe_claude_skill_package/frappe-syntax-clientscripts
Claude Code and agent skill by openaec-foundation/frappe_claude_skill_package
- community
Checking that the SKILL.md file is still in the repository.
Use when writing client-side JavaScript for ERPNext/Frappe form events, field manipulation, server calls, or child table handling in v14/v15/v16. Covers exact syntax for frappe.ui.form.on, frm methods, frappe.call, and browser-side validation. Keywords: client script, form event, frm, frappe.call, frappe.ui.form.on, JavaScript, UI interaction, field validation, form event syntax, how to write client script, frm example, frappe.call example.
Install
npx vskill@latest install openaec-foundation/frappe_claude_skill_package/frappe-syntax-clientscriptsSKILL.md
The same SKILL.md was published earlier as openaec-foundation/frappe_claude_skill_package/frappe-syntax-clientscripts.
Frappe Client Scripts Syntax
Client Scripts run in the browser and control all UI interactions in Frappe/ERPNext. Create them via Setup > Client Script or in custom apps under public/js/.
CRITICAL: Client Script validations ONLY apply in the browser form view. API calls and System Console bypass them. ALWAYS pair with Server Scripts for security-critical validation.
Quick Reference
| Action | Code | |
|---|---|---|
| Set value | frm.set_value('field', value) | |
| Get value | frm.doc.fieldname | |
| Hide field | frm.toggle_display('field', false) | |
| Make mandatory | frm.toggle_reqd('field', true) | |
| Make read-only | frm.toggle_enable('field', false) | |
| Set field property | frm.set_df_property('field', 'options', [...]) | |
| Filter Link field | frm.set_query('field', () => ({filters: {}})) | |
| Call server | frappe.call({method: 'path.to.fn', args: {}}) | |
| Call doc method | frm.call('method_name', {args}) | |
| Prevent save | frappe.throw(__('Error message')) | |
| Add button | frm.add_custom_button(__('Label'), callback, group) | |
| Add child row | frm.add_child('table', {values}); frm.refresh_field('table') | |
| Show alert | frappe.show_alert({message: __('Done'), indicator: 'green'}) | |
| Translate string | __('Text') or __('Hello {0}', [name]) |
Event Decision Tree
See references/events.md for complete event list and execution order.
Form Event Registration
Value Manipulation
Field Properties
Link Field Filters
Server Communication
Child Table Operations
Custom Buttons
List View Customization
Dialogs and Prompts
Critical Rules
- ALWAYS call
frm.refresh_field('table')after ANY child table modification - NEVER assign
frm.doc.field = value— ALWAYS usefrm.set_value() - ALWAYS use
__('text')for every user-facing string - ALWAYS place
set_queryinsetup— NEVER inrefresh - NEVER use
async: false— it freezes the browser - ALWAYS check
frm.is_new()before adding action buttons - NEVER use direct jQuery selectors for field manipulation — use Frappe API
- NEVER store state in global variables — attach to
frmobject instead - ALWAYS check
r.messagebefore using server call responses - ALWAYS use
frappe.throw()insidevalidateto block save — NEVERreturn falsein async handlers
See references/methods.md for complete API reference.See references/examples.md for real-world patterns.See references/anti-patterns.md for common mistakes.
Related Skills
frappe-impl-clientscripts— Implementation workflows and decision treesfrappe-errors-clientscripts— Error handling and debugging patternsfrappe-syntax-whitelisted— Server-side methods called from client scriptsfrappe-syntax-doctypes— DocType field definitions referenced in scripts
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/source/syntax/frappe-syntax-clientscripts/SKILL.md
Popularity
- Repository stars
- 90
- Repository forks
- 26
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 29 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openaec-foundation/frappe_claude_skill_package/frappe-syntax-clientscripts)