You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue where server scripts are not executing as expected in ERPNext v15. Specifically, I've created a simple server script that is intended to run on the Customer doctype with the After Insert event, but the script doesn't appear to trigger at all. I've verified the script setup and also attempted different document types and events, but none seem to work.
Environment:
ERPNext Version: 15.43.3
Frappe Version: v15.48.1
Steps to Reproduce:
Go to Settings > Server Script and create a new server script.
Script Type: Document Event
Reference Document Type: Customer
Event: After Insert
Script:
python
Copy code
def create_project_and_tasks(doc, method):
frappe.log_error(title="Server Script Trigger Test", message=f"Server script has been triggered for the document: {doc.name}")
frappe.throw("Server script triggered successfully.")
Save the script and ensure it is Active.
Create a new Customer from the Customer doctype.
Expected Behavior:
When a new customer is created, the server script should:
Log an entry in the Error Log with the title "Server Script Trigger Test".
Raise an error saying "Server script triggered successfully."
Actual Behavior:
No log entries are created in the Error Log.
No pop-up error is displayed after saving the customer.
It appears that the server script is not being triggered at all.
Additional Details:
I have verified that the server script feature is enabled in the site_config.json with "server_script_enabled": true.
I have also tried other document types (e.g., Sales Order) and different events (Before Insert, Before Save).
Client scripts are working fine, and I can confirm that client-side execution triggers as expected.
I tried restarting the bench and verified that the script is active and permissions are appropriate, but still no luck.
No relevant logs or errors appear in the Error Log or in the bench console when running the server script.
Steps Taken for Troubleshooting:
Restarted ERPNext services using bench restart.
Ensured that the server script feature is enabled.
Tested on different doctypes and events.
Verified user permissions and logged in as an administrator.
Monitored the bench console but didn't observe any related errors or logs.
Module
selling, other
Version
ERPNext Version: 15.43.3
Frappe Version: v15.48.1
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response
The text was updated successfully, but these errors were encountered:
Information about bug
I'm experiencing an issue where server scripts are not executing as expected in ERPNext v15. Specifically, I've created a simple server script that is intended to run on the Customer doctype with the After Insert event, but the script doesn't appear to trigger at all. I've verified the script setup and also attempted different document types and events, but none seem to work.
Environment:
ERPNext Version: 15.43.3
Frappe Version: v15.48.1
Steps to Reproduce:
Go to Settings > Server Script and create a new server script.
Script Type: Document Event
Reference Document Type: Customer
Event: After Insert
Script:
python
Copy code
Save the script and ensure it is Active.
Create a new Customer from the Customer doctype.
Expected Behavior:
When a new customer is created, the server script should:
Log an entry in the Error Log with the title "Server Script Trigger Test".
Raise an error saying "Server script triggered successfully."
Actual Behavior:
No log entries are created in the Error Log.
No pop-up error is displayed after saving the customer.
It appears that the server script is not being triggered at all.
Additional Details:
I have verified that the server script feature is enabled in the site_config.json with "server_script_enabled": true.
I have also tried other document types (e.g., Sales Order) and different events (Before Insert, Before Save).
Client scripts are working fine, and I can confirm that client-side execution triggers as expected.
I tried restarting the bench and verified that the script is active and permissions are appropriate, but still no luck.
No relevant logs or errors appear in the Error Log or in the bench console when running the server script.
Steps Taken for Troubleshooting:
Restarted ERPNext services using bench restart.
Ensured that the server script feature is enabled.
Tested on different doctypes and events.
Verified user permissions and logged in as an administrator.
Monitored the bench console but didn't observe any related errors or logs.
Module
selling, other
Version
ERPNext Version: 15.43.3
Frappe Version: v15.48.1
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response
The text was updated successfully, but these errors were encountered: