Issue with a trigger added on a custom object that was created with a "deleted audit" purpose

(Doc ID 2180373.1)

Last updated on SEPTEMBER 07, 2016

Applies to:

Oracle Fusion Sales Cloud Service - Version and later
Information in this document applies to any platform.


For the purpose of delete audit, customer has created a new custom object called "Deleted Object".

This object contains one record for every record that is deleted on several custom and standard objects.

Triggers were created on the "After Delete in Database" trigger of the objects.

Having the above in mind, customer has the following issue on the Account standard object:

- they have added the below Groovy script on the "After Delete in Database" trigger of the object:

def voDeletedRecord = newView('DeletedRecord_c')
def createDR = voDeletedRecord.createRow()
def currentDateTime = now()

createDR.setAttribute('RecordId_c', PartyId)

- however this trigger is never being called when an Account record (all vanilla) is deleted.

For testing purposes, customer has created a trigger on the "After Update in Database" event of the same object, with the exact same code and they noticed that this is the trigger being called when deleting a record, even though no field is changed before deletion.

Customer is asking the following:

1) Shouldn't the "After Delete" trigger work on this object as well, as it does for all the others?
2) If it does not and they need to use "After Update in Database" to capture the deletes on the Account object, what field can they use to distinguish normal updates versus the delete operations? Customer noticed that the field "PartyStatus" contains a NULL value on delete - is this the field that they can use?


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms