WD_PERMISSION_DENIED on update

I am trying to update a record on the backend, passing the options params with suppressAuth = true but still getting WD_PERMISSION_DENIED.

What is going on? This used to work. Function being called onAfterUpdate event.

async function updateInscricao ( item ) {
let options = {
“suppressAuth” : true ,
“suppressHooks” : true
};

**await**  wixData . update ( "InscricaoTb" ,  item ,  options ). then (( results ) => { 
    logData ( "updateInscricao ok" ,  results ); 
}). **catch** (( err ) => { 
    logData ( "updateInscricao error" ,  err ); 
}); 

}

Code above used to work, but now it generates an error with: WD_PERMISSION_DENIED

I was only able to run this successfully after changing table permission to Update = Anyone. Which should not be necessary due to SupressAuth = true.

Hello! If you are still experiencing this it sounds like a bug. Please start a ticket via wix.com/contact so that support can escalate the matter for you

suppressAuth can be used on backend code only. If the code you posted above is on frontend (page code/masterpage.js), it won’t work. Check out how to work with backend functions in Velo.