Account before insert trigger not working from REST
Summary:
Account Before Insert trigger does not run, when calling REST api
Content (please ensure you mask any confidential information):
Hi, we're creating accounts via REST, and we noticed the Before Insert trigger is not running.
I even added a ValidationException, to see if it would return an error in the REST call, but it does not.
This is the BeforeInsert script:
throw new oracle.jbo.ValidationException("entrou no BeforeInsert da conta. CNPJ: ${ACCTXT_0001_c}, estado: ${ACCTXT_0033_c}, type: ${SalesProfileType}");
But when we call Account creation REST api, it doesn't return any error, it actually creates the account.
However, it runs the Before Update trigger. Even though I'm calling POST to CREATE a NEW account, in only runs Before Update trigger, and not BeforeInsert