Skip to content

EspoCRM – Open Source CRM Application

return dispatch check controller

Yurii7272f3c24521
diff --git a/client/src/views/list.js b/client/src/views/list.js
index 9a67d1c207..2f5cf6d269 100644
--- a/client/src/views/list.js
+++ b/client/src/views/list.js
@@ -785,7 +785,8 @@ class ListView extends MainView {
* params.options.categoryName = this.currentCategoryName;
* ```
*
- * @param {Object} params Parameters to be modified.
+ * @param {{controller?: string, action?: string, options?: Record}} params Parameters to be modified.
+ * Unset `controller` if bypass return dispatching (to force to come back to the `returnUrl`).
*/
prepareCreateReturnDispatchParams(params) {}
diff --git a/client/src/views/record/detail.js b/client/src/views/record/detail.js
index fda09b3837..57eba14497 100644
--- a/client/src/views/record/detail.js
+++ b/client/src/views/record/detail.js
@@ -3562,7 +3562,7 @@ class DetailRecordView extends BaseRecordView {
}
}
- if (this.returnDispatchParams) {
+ if (this.returnDispatchParams && this.returnDispatchParams.controller) {
const controller = this.returnDispatchParams.controller;
const action = this.returnDispatchParams.action;
options = this.returnDispatchParams.options || {};