erpnext-syntax-serverscripts

Reference ERPNext/Frappe Server Script syntax for Document Events, API endpoints, Scheduler Events, and Permission Queries.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-syntax-serverscripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: erpnext-syntax-serverscripts
Source: https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package/tree/main/skills/source/syntax/erpnext-syntax-serverscripts
Command: npx skills add https://github.com/OpenAEC-Foundation/ERPNext_Anthropic_Claude_Development_Skill_Package --skill erpnext-syntax-serverscripts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

ERPNext/Frappe Server Script syntax can be error-prone; this skill provides a comprehensive reference to reduce production-time mistakes and misconfigurations.

Core Features & Use Cases

  • Document Event syntax and lifecycle mapping for pre/post-save validation and events across ERPNext v14–v16.
  • API endpoints, Scheduler events, and Permission Queries examples with safe patterns, whitelisting, and typical use cases.
  • Sandbox rules and available frappe. methods* guidance to prevent common import and environment mistakes.

Quick Start

Review the ERPNext Server Script reference content to craft safe, production-ready server scripts for your DocTypes.

Frequently Asked Questions about erpnext-syntax-serverscripts

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

FAQPage Schema
How do I write an ERPNext Server Script for document events without causing production errors?

To write an ERPNext Server Script for document events safely, use correct frontmatter metadata and clear event mappings for pre-save and post-save lifecycle validation. Following safe scripting patterns prevents common production-time errors across ERPNext v14–v16.

What frappe methods are available in the ERPNext server script sandbox?

The ERPNext server script sandbox restricts standard imports and limits available frappe.* methods to maintain environment safety. The skill provides reference guidance on these sandbox constraints to help you avoid common import and environment mistakes.

How do I create a whitelisted API endpoint using Frappe server scripts?

To create a whitelisted API endpoint using Frappe server scripts, you must define the endpoint with safe patterns and proper whitelisting. The skill provides examples of API endpoint configurations alongside typical use cases for secure external access.

Does ERPNext server script syntax differ between v14, v15, and v16?

ERPNext server script syntax is covered comprehensively for v14 through v16 to ensure compatibility. The reference maps document events, scheduler events, and permission queries across these versions, reducing misconfigurations during platform upgrades.

What are the limitations of using Frappe permission queries in server scripts?

Frappe permission queries in server scripts are bound by sandbox rules and available frappe.* methods, limiting complex direct database access. Understanding these constraints is necessary to prevent execution failures and ensure scripts follow safe querying patterns.