Hi JD,
I’ve tried using the code, but it seems to prompt dataset validation error continuously on preview mode.
Have yet to try on live site yet, but what might be the cause of validation error if all field has been assigned correctly?
Any requirement to set the serialID, for now i’ve set to “Text” field
As below is site event logs :
“root”: {
“insertId”:“…5jqzXe1Gx4XQgdyhjnCx5X”
“timestamp”:“2023-01-02T06:47:02.152Z”
“labels”: { “siteUrl”:“n/a”
“revision”:“-1000”
“namespace”:“Velo”
“tenantId”:“93f44a73-e665-43e1-b115-6cbb29162183”
“viewMode”:“Preview”
}
“operation”: { “id”:“03721773-efaf-9e0b-aa66-cd7b9da79947”
“producer”:“backend”
}
“jsonPayload”: { “message”:“[”\n \u001b[31mx\u001b[0m Expected ‘{’, got ‘=>’\n ,-[\u001b[36;1;4m/user-code/backend/data.js\u001b[0m:7:1]\n \u001b[2m7\u001b[0m | export async function FormDetails_beforeInsert(item, context) => {\n : \u001b[31;1m ^^\u001b[0m\n `----\n\n\nCaused by:\n 0: failed to process input file\n 1: Syntax Error"]"
}
“severity”:“ERROR”
“receiveTimestamp”:“2023-01-02T06:47:02.183Z”
}