Error: "ReferenceError: frappe is not defined"

When attempting to use frappe.call, frappe.session, or frappe.defaults in our CRM customizations, we encountered the error:

This error indicates that the full Frappe framework is not loaded in the CRM app environment.
mplications:

  • We cannot rely on Frappe’s built-in functions (like AJAX calls or accessing session data) for our customizations in this context.
  • Alternative methods such as custom API endpoints or server-side data injection need to be considered.

Screenshot from 2025-03-03 13-48-31