Hi everyone!! does anybody knows how to block savi...
# suitescript
j
Hi everyone!! does anybody knows how to block saving a record in any context?
c
Create a role w/o the permission to save.
j
i just need to avoid save when record has a specific condition
e
throw
from a
beforeSubmit
on a User Event script that is deployed to All Roles
j
any example??, i'm trying but there's something wrong
e
Copy code
function beforeSubmit(context) {
  if (!yourConditions) {
    throw "Conditions not met.";
  }
}
Including an
N/error
j
Great !!