Why aren’t dependent records deleted with the parent record?


A real estate lease has a dependent association with payment schedules and we are encountering an issue where the dependent payment schedules are not getting deleted when we delete the parent lease.

The real estate lease has a dependent association with payment schedule. When the lease is deleted, platform code also deletes any dependent records. However, you will have to wait for the Cleanup Agent to run for the deletion of dependent records. When you delete the lease record, the lease does not appear in the manager query anymore, but the lease is still waiting in the database for the Cleanup Agent to be run to get deleted completely. After the Cleanup Agent runs to permanently delete the lease, the associated payment line items will be marked for deletion. Then upon the subsequent cleanup activity, these associated records will also be permanently deleted.

It is recommended that the Cleanup Agent run each night and it should never be disabled. Also, it is recommended to terminate the payment schedules before deleting the lease, because the Scheduler Agent may stop the system from cleaning up the payment schedules if the schedule is still active.

Continue reading

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s