Question:
I’m trying to update (and/or) remove a record from a WixForm collection.
I can run the code to query it and it’s successful (using the equivalent “get” function)
When I run Update or Remove - I get a WDE0149 : Internal application error
I’m using code pretty much copy/paste from the user guide (see below)
Product:
VELO/code
What are you trying to achieve:
Data collection updates from code
What have you already tried:
Current Code looks like this
let options = {
“suppressAuth”: true
};
let toupdate={
_id : “3a133186-6684-4864-9ac1-794b6b70770f”,
first_name : “test”
};
wixData
.update(“WixForms/0e029055-a4f2-4d0d-b3ca-15f857351319”, toupdate, options)
.then((result) => {
console.log(result); // see updated item below
console.log(“Updated”);
})
.catch((err) => {
console.log(err);
console.log(“Error on update”);
});
Additional information:
I’m pretty new to Wix and JS (but have programming experience).
Currently running Wix free version while I ascertain if it does all the tasks I need
I thought it might be a permissions issue because the Collection console says that WIXForms collections cant have their permissions changed, but adding suppressAuth makes no difference.
The console logs correctly showing that the function is executed (on a button click)