English
flow.approval.edit.form.render.before
About 316 wordsAbout 1 min
2025-11-24
This hook is used before the edit approval content form or page is rendered on the approval detail page, for example to forcibly open the edit approval content form or page.
Note: This hook is used before the edit approval content form/page is rendered on the approval detail page, for example to forcibly open the edit approval content form/page.
forceShowEditForm
- If the approval content is configured using a standard layout, and there are no required fields or the required fields already have values, the approval content dialog will not be displayed. Instead, the approval opinion dialog will appear so the user can fill in the opinion and complete the approval.
- If the approval content is configured using a workflow layout, and there are no required fields and no child objects, the approval content page will not be opened. Instead, the approval opinion dialog will appear so the user can fill in the opinion and complete the approval.
- If this API is executed in PWC, then under the above scenarios, the approval content dialog/page will still be opened or navigated to.
Parameters
| Parameter | Description | Type |
|---|---|---|
| isForceShowEditForm | true: forcibly open the edit content dialog/pagefalse: do not forcibly open the edit content dialog/page | Boolean |
Parameter Code Example
forceShowEditForm: trueCode Example
module.exports = function (context, pluginService, pluginParam) {
return {
apply() {
let self = this;
return [{
/**
* Set the externally injected methods exposed to the plugin
* Whether to forcibly enter the form page when the approval flow has a form
*/
event: "flow.approval.edit.form.render.before",
functional: async function (context, options) {
return Promise.resolve({
// When the return value is true, forcibly enter the form page
forceShowEditForm: true
});
}
}]
}
}
}
