Skip to main content

BeforeSaveFunction()

BeforeSaveFunction: (params) => Promise<object>

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.

Parameters

ParameterType
paramsobject
params.adminUserAdminUser
params.adminforthIAdminForth
params.extra?HttpExtra
params.oldRecord?any
params.recordany
params.recordIdany
params.resourceAdminForthResource

Returns

Promise<object>

error?

optional error: string

ok

ok: boolean