In addition to what
@David Morton said, if you are trying to determine in the trigger code if deletion is coming from main or sub object for your customization, I would recommend doing a SQL trace (action trace) and comparing the two actions of deleting, this could give you an idea on how to modify your code to distinguish between the two situations. I would also suggest to check with the person who developed the customization.
Lastly, perhaps there is a way to achieve your validations with a Clarity process, so you do not have to add database objects and triggers. This would be something that's supported, and can be more flexible.
------------------------------
Principal Support Engineer
Broadcom
------------------------------
Original Message:
Sent: 07-08-2019 03:52 AM
From: David Morton
Subject: Unable to delete subobject rows from main object due to validations on sub object
OK so your validations are (unsupported) customisations - so you are unlikely to get a supported "fix" for your issue I would think.
You need the code that you have written for your sub-object validation to be "aware" of how its has been called ; I'm not really sure how you would do that as I'm not even sure how the application cascades that delete instruction (so whether the application handles the delete of the sub-object when it is processing a delete of the master-object OR whether it just relies on a cascade delete at database level).
Assuming you have a trigger on the master-object as well, perhaps you could set some custom-value against the master-object instance in that trigger which then allows your code in the sub-object trigger to ignore the validations on-delete there?
(GUESSing though - you have a custom code issue problem to solve rather than an application one :( )
Original Message:
Sent: 07-08-2019 02:39 AM
From: Benitha Balachandran
Subject: Unable to delete subobject rows from main object due to validations on sub object
Hi David,
The validations are implemented in trigger ob sub object and messages_en.properties file is used to display the validation messages. We do not want these messages on the sub object to fire , when we delete rows from the main object.
Regards,
Benitha
Original Message:
Sent: 07-05-2019 11:09 AM
From: David Morton
Subject: Unable to delete subobject rows from main object due to validations on sub object
Little confused about your question - regarding the "validations" - how are these implemented?
Original Message:
Sent: 07-05-2019 09:02 AM
From: Benitha Balachandran
Subject: Unable to delete subobject rows from main object due to validations on sub object
Trying do delete row on main object . There are validations on the sub object which prevents the rows from getting deleted on the main and sub object.
If we have a way of knowing that the delete came from the main object, we want to be able to delete the sub object rows without validations firing.
Have you ever come across such a scenario?
Regards,
Benitha