Impact of Client Scripts and Server Scripts During ERPNext/Frappe Version Upgrades and Migration

Hi Team,

I am currently using ERPNext/Frappe Version 16 and have multiple custom Client Scripts and Server Scripts configured in my instance.

I would like to understand the impact of future upgrades and migrations (for example, upgrading from Version 16 to newer Frappe/ERPNext releases).

My questions are:

  1. Will existing Client Scripts and Server Scripts continue to work automatically after upgrading from Version 16 to future versions?

  2. Can framework or API changes in newer versions break existing Client Scripts or Server Scripts?

  3. What are the most common issues encountered with custom scripts during upgrades?

  4. Are there any best practices or tools to identify scripts that may fail after migration?

  5. How do you usually test Client Scripts and Server Scripts before upgrading a production environment?

  6. Is there a recommended migration checklist for ERPNext instances with a large number of Client Scripts and Server Scripts?

I would appreciate hearing from anyone who has upgraded ERPNext/Frappe instances with significant script-based customizations.

Thank you.

Disclaimer: I’m not affiliated with Frappe Technologies. The following is based on my experience and assumes no major structural changes to Client/Server Scripts are introduced in future versions.

Short answer: scripts survive upgrades structurally, but API/framework changes will break them functionally.

1. Do scripts carry over automatically? Yes - Client Scripts and Server Scripts are stored in the database, so they persist through upgrades. But “surviving” ≠ “working.”

2. Can API changes break them? Absolutely. Between major versions, JS APIs, Python module paths, and DocType structures can change without your scripts knowing about it.

3. Most common issues

  • Client scripts using deprecated JS APIs
  • Server scripts calling Python methods that moved or were removed
  • Hardcoded field/doctype names that changed in the new version

4. How to find at-risk scripts No automated scanner exists - review the breaking changes listed in the Frappe/ERPNext changelogs for each version between your current and target release, then audit your scripts manually or task a AI with it (we were quite successful at identifying problems using frontier models)

5. Testing before upgrade

  • Spin up a staging instance, restore a prod DB backup, run the upgrade there first
  • Walk through each major workflow that has scripts attached
  • Check browser console errors for client script failures
  • Enable Frappe’s error log and trigger server scripts manually

6. Large script inventories If you have a significant number of scripts, seriously consider migrating them into a custom app. You get version control, (can add) proper testing, and your customizations become far easier to maintain across upgrades compared to DB-stored scripts.

best way is to rewrite your server and clients scripts in a custom app otherwise they maybe lost or stop working because of change on syntax in the new version