Why Is Before Remove Trigger Being Called When Adding New Record?
(Doc ID 2731087.1)
Last updated on NOVEMBER 23, 2020
Applies to:
Oracle Fusion CX Sales Cloud Service - Version 11.13.20.07.0 and laterInformation in this document applies to any platform.
Goal
There are two triggers on the object with the same if statement condition, but different error messages thrown.
- a before Remove trigger
- a before Insert trigger.
When trying to remove a record from the collection, the error message which is displayed is the correct one, corresponding to the Before Remove trigger.
When trying to add a record to the collection, the error message which is displayed is not the expected one (the one in the Before Insert trigger), but the one corresponding to the Before Remove trigger.
Why is this happening?
// Before Remove trigger
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(1 == 1) // this is generic condition
{
throw new oracle.jbo.ValidationException("Error message from Before Remove")
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Before Insert trigger
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if(1 == 1) // this is generic condition
{
throw new oracle.jbo.ValidationException("Error message from Before Insert")
}
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |