| [ Web Proxy ] |
| Viewing: https://adminforth.dev/docs/api/Back/type-aliases/BeforeDeleteSaveFunction/ | [Back] [Original] |
BeforeDeleteSaveFunction = (
params) =>Promise<{error?:string;ok:boolean; }>
Modify record to change how data is saved to database. Return ok: false and error: string to stop execution and show error message to user. Return ok: true to continue execution.
| Parameter | Type | Description |
|---|---|---|
params | { adminforth: IAdminForth; adminUser: AdminUser; extra?: HttpExtra; record: any; recordId: any; resource: AdminForthResource; response?: IAdminForthHttpResponse; } | - |
params.adminforth | IAdminForth | Adminforth instance. |
params.adminUser | AdminUser | Admin user performing the action. |
params.extra? | HttpExtra | Extra HTTP information. Prefer using extra.response over the top-level response field. |
params.record | any | Record data before deletion. |
params.recordId | any | Primary key value of the record to delete. |
params.resource | AdminForthResource | Resource info. |
params.response? | IAdminForthHttpResponse | HTTP response object. Deprecated Since 1.2.9. Will be removed in 4.0.0. Use extra.response instead. |
Promise<{ error?: string; ok: boolean; }>
| Web Proxy Viewer | New URL | Original Page |